[PATCH] Provide a 'safe-mode' for soft raid.
commit063e9f83cb41e585f1ee6cf69c7ef416359be2d4
authorNeil Brown <neilb@cse.unsw.edu.au>
Mon, 17 Feb 2003 11:17:51 +0000 (17 03:17 -0800)
committerJames Bottomley <jejb@raven.il.steeleye.com>
Mon, 17 Feb 2003 11:17:51 +0000 (17 03:17 -0800)
tree48d2d7ac3c52835e56feb494efda8cb8b21f4e5b
parentf80157341c611ec02c386e86fc233bf587b28d5e
[PATCH] Provide a 'safe-mode' for soft raid.

When a raid1 or raid5 array is in 'safe-mode', then the array
is marked clean whenever there are no outstanding write requests,
and is marked dirty again before allowing any write request to
proceed.

This means than an unclean shutdown while no write activity is happening
will NOT cause a resync to be required.  However it does mean extra
updates to the superblock.

Currently safe-mode is turned on by sending SIGKILL to the raid thread
as would happen at a normal shutdown.  This should mean that the
reboot notifier is no longer needed.

After looking more at performance issues I may make safemode be on
all the time.  I will almost certainly make it on when RAID5 is degraded
as an unclean shutdown of a degraded RAID5 means data loss.

This code was provided by  Angus Sawyer <angus.sawyer@dsl.pipex.com>
drivers/md/md.c
drivers/md/raid1.c
drivers/md/raid5.c
include/linux/raid/md.h
include/linux/raid/md_k.h