summaryrefslogtreecommitdiff
path: root/include/linux/raid/md.h
diff options
context:
space:
mode:
authorNeil Brown <neilb@cse.unsw.edu.au>2003-02-17 03:17:51 -0800
committerJames Bottomley <jejb@raven.il.steeleye.com>2003-02-17 03:17:51 -0800
commit063e9f83cb41e585f1ee6cf69c7ef416359be2d4 (patch)
tree48d2d7ac3c52835e56feb494efda8cb8b21f4e5b /include/linux/raid/md.h
parentf80157341c611ec02c386e86fc233bf587b28d5e (diff)
[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>
Diffstat (limited to 'include/linux/raid/md.h')
-rw-r--r--include/linux/raid/md.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h
index ff0538dae18c..d7834b08cc88 100644
--- a/include/linux/raid/md.h
+++ b/include/linux/raid/md.h
@@ -73,6 +73,9 @@ extern mdk_thread_t * md_register_thread (void (*run) (void *data),
extern void md_unregister_thread (mdk_thread_t *thread);
extern void md_wakeup_thread(mdk_thread_t *thread);
extern void md_interrupt_thread (mdk_thread_t *thread);
+extern void md_write_start(mddev_t *mddev);
+extern void md_write_end(mddev_t *mddev, mdk_thread_t *thread);
+extern void md_handle_safemode(mddev_t *mddev);
extern void md_done_sync(mddev_t *mddev, int blocks, int ok);
extern void md_sync_acct(mdk_rdev_t *rdev, unsigned long nr_sectors);
extern void md_error (mddev_t *mddev, mdk_rdev_t *rdev);