diff options
author | NeilBrown <neilb@suse.de> | 2014-12-15 12:57:01 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2015-02-06 09:32:56 +1100 |
commit | 23da422b1951cb8dbcb7c3090057cb6d5ceedf49 (patch) | |
tree | a8ee30585883d85d661faf1cb21aa0baddff62c7 /drivers/md/md.h | |
parent | 1b30e66f5acc6bf22fff49d4093cf17454f914b7 (diff) | |
download | linux-23da422b1951cb8dbcb7c3090057cb6d5ceedf49.tar.bz2 |
md: use mddev->lock to protect updates to resync_{min,max}.
There are interdependencies between these two sysfs attributes
and whether a resync is currently running.
Rather than depending on reconfig_mutex to ensure no races when
testing these interdependencies are met, use the spinlock.
This will allow the mutex to be remove from protecting this
code in a subsequent patch.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.h')
-rw-r--r-- | drivers/md/md.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/md.h b/drivers/md/md.h index b4fbd6a63fcf..6bf3faa951ec 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h @@ -394,6 +394,8 @@ struct mddev { * pers (also protected by reconfig_mutex and pending IO). * clearing ->bitmap * clearing ->bitmap_info.file + * changing ->resync_{min,max} + * setting MD_RECOVERY_RUNNING (which interacts with resync_{min,max}) */ spinlock_t lock; wait_queue_head_t sb_wait; /* for waiting on superblock updates */ |