diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-08-15 12:59:42 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-08-15 12:59:42 +0900 |
commit | 60e0a4c7adc700f2d2929cdb2d0055e519a3eb3d (patch) | |
tree | b19755368b6d0f6be3024d972de13f4b48cb025d /drivers/md/md.h | |
parent | 180aa6e6aa11922dcd4c13df1967d62bb2ede76c (diff) | |
parent | 237674e050ae8ea40a432412df6c15d60b7ae8a6 (diff) |
Merge branch 'sh/stable-updates'
Diffstat (limited to 'drivers/md/md.h')
-rw-r--r-- | drivers/md/md.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/md/md.h b/drivers/md/md.h index 78f03168baf..f8fc188bc76 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h @@ -223,6 +223,16 @@ struct mddev_s * so we don't loop trying */ int in_sync; /* know to not need resync */ + /* 'open_mutex' avoids races between 'md_open' and 'do_md_stop', so + * that we are never stopping an array while it is open. + * 'reconfig_mutex' protects all other reconfiguration. + * These locks are separate due to conflicting interactions + * with bdev->bd_mutex. + * Lock ordering is: + * reconfig_mutex -> bd_mutex : e.g. do_md_run -> revalidate_disk + * bd_mutex -> open_mutex: e.g. __blkdev_get -> md_open + */ + struct mutex open_mutex; struct mutex reconfig_mutex; atomic_t active; /* general refcount */ atomic_t openers; /* number of active opens */ |