]> err.no Git - linux-2.6/commit
[PATCH] md: replace magic numbers in sb_dirty with well defined bit flags
authorNeilBrown <neilb@suse.de>
Tue, 3 Oct 2006 08:15:46 +0000 (01:15 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 3 Oct 2006 15:04:17 +0000 (08:04 -0700)
commit850b2b420cd5b363ed4cf48a8816d656c8b5251b
treeb63aa37b3fb7dfb7a0b674d5a2ebe9da13cc7405
parent6814d5368d68341ec6b5e4ecd10ea5947130775a
[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>
drivers/md/md.c
drivers/md/multipath.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5.c
include/linux/raid/md.h
include/linux/raid/md_k.h