diff options
author | NeilBrown <neilb@suse.de> | 2014-12-15 12:56:56 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2015-02-04 08:35:52 +1100 |
commit | 85572d7c75fd5b9fa3fc911e1c99c68ec74903a0 (patch) | |
tree | c5cddb46ed2460752c371c2775521de87d1450e2 /drivers/md/md.h | |
parent | ea664c8245f3d5e78d05d1250bc0be0d60e264af (diff) |
md: rename mddev->write_lock to mddev->lock
This lock is used for (slightly) more than helping with writing
superblocks, and it will soon be extended further. So the
name is inappropriate.
Also, the _irq variant hasn't been needed since 2.6.37 as it is
never taking from interrupt or bh context.
So:
-rename write_lock to lock
-document what it protects
-remove _irq ... except in md_flush_request() as there
is no wait_event_lock() (with no _irq). This can be
cleaned up after appropriate changes to wait.h.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.h')
-rw-r--r-- | drivers/md/md.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/md/md.h b/drivers/md/md.h index 03cec5bdcaae..f0d15bdd96d4 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h @@ -386,7 +386,13 @@ struct mddev { struct work_struct del_work; /* used for delayed sysfs removal */ - spinlock_t write_lock; + /* "lock" protects: + * flush_bio transition from NULL to !NULL + * rdev superblocks, events + * clearing MD_CHANGE_* + * in_sync - and related safemode and MD_CHANGE changes + */ + spinlock_t lock; wait_queue_head_t sb_wait; /* for waiting on superblock updates */ atomic_t pending_writes; /* number of active superblock writes */ |