diff options
author | NeilBrown <neilb@suse.de> | 2006-10-03 04:15:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 11:04:17 -0400 |
commit | 850b2b420cd5b363ed4cf48a8816d656c8b5251b (patch) | |
tree | b63aa37b3fb7dfb7a0b674d5a2ebe9da13cc7405 /drivers/md/raid1.c | |
parent | 6814d5368d68341ec6b5e4ecd10ea5947130775a (diff) |
[PATCH] md: replace magic numbers in sb_dirty with well defined bit flags
Instead of magic numbers (0,1,2,3) in sb_dirty, we have
some flags instead:
MD_CHANGE_DEVS
Some device state has changed requiring superblock update
on all devices.
MD_CHANGE_CLEAN
The array has transitions from 'clean' to 'dirty' or back,
requiring a superblock update on active devices, but possibly
not on spares
MD_CHANGE_PENDING
A superblock update is underway.
We wait for an update to complete by waiting for all flags to be clear. A
flag can be set at any time, even during an update, without risk that the
change will be lost.
Stop exporting md_update_sb - isn't needed.
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 3b4d69c05623..2817c477302d 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -969,7 +969,7 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev) | |||
969 | } | 969 | } |
970 | clear_bit(In_sync, &rdev->flags); | 970 | clear_bit(In_sync, &rdev->flags); |
971 | set_bit(Faulty, &rdev->flags); | 971 | set_bit(Faulty, &rdev->flags); |
972 | mddev->sb_dirty = 1; | 972 | set_bit(MD_CHANGE_DEVS, &mddev->flags); |
973 | printk(KERN_ALERT "raid1: Disk failure on %s, disabling device. \n" | 973 | printk(KERN_ALERT "raid1: Disk failure on %s, disabling device. \n" |
974 | " Operation continuing on %d devices\n", | 974 | " Operation continuing on %d devices\n", |
975 | bdevname(rdev->bdev,b), conf->working_disks); | 975 | bdevname(rdev->bdev,b), conf->working_disks); |