summaryrefslogtreecommitdiffstats
path: root/drivers/md/md.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-08-27 16:28:23 +1000
committerNeilBrown <neilb@suse.de>2013-08-27 16:28:23 +1000
commit7a0a5355cbc71efa430c3730ffbd67ae04abfe31 (patch)
tree3e45ce8d666145ead0b859f402aa6fbf1f73f567 /drivers/md/md.h
parentc9ad020fec895bf1e5fcc322d0ab9e67efd3e3a0 (diff)
downloadlinux-7a0a5355cbc71efa430c3730ffbd67ae04abfe31.tar.gz
linux-7a0a5355cbc71efa430c3730ffbd67ae04abfe31.tar.bz2
linux-7a0a5355cbc71efa430c3730ffbd67ae04abfe31.zip
md: Don't test all of mddev->flags at once.
mddev->flags is mostly used to record if an update of the metadata is needed. Sometimes the whole field is tested instead of just the important bits. This makes it difficult to introduce more state bits. So replace all bare tests of mddev->flags with tests for the bits that actually need testing. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.h')
-rw-r--r--drivers/md/md.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/md.h b/drivers/md/md.h
index 20f02c0b5f2d..53283beda21b 100644
--- a/drivers/md/md.h
+++ b/drivers/md/md.h
@@ -204,11 +204,12 @@ struct mddev {
struct md_personality *pers;
dev_t unit;
int md_minor;
- struct list_head disks;
+ struct list_head disks;
unsigned long flags;
#define MD_CHANGE_DEVS 0 /* Some device status has changed */
#define MD_CHANGE_CLEAN 1 /* transition to or from 'clean' */
#define MD_CHANGE_PENDING 2 /* switch from 'clean' to 'active' in progress */
+#define MD_UPDATE_SB_FLAGS (1 | 2 | 4) /* If these are set, md_update_sb needed */
#define MD_ARRAY_FIRST_USE 3 /* First use of array, needs initialization */
int suspended;
@@ -218,7 +219,7 @@ struct mddev {
* are happening, so run/
* takeover/stop are not safe
*/
- int ready; /* See when safe to pass
+ int ready; /* See when safe to pass
* IO requests down */
struct gendisk *gendisk;