diff options
author | NeilBrown <neilb@cse.unsw.edu.au> | 2005-06-22 04:17:12 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-22 06:07:43 +0400 |
commit | 06d91a5fe0b50c9060e70bdf7786f8a3c66249db (patch) | |
tree | 95a8b9228534cebb12eb31c1cc9cc0c45f685410 /include/linux/raid/md.h | |
parent | fca4d848f0e6fafdc2b25f8a0cf1e76935f13ac2 (diff) | |
download | linux-06d91a5fe0b50c9060e70bdf7786f8a3c66249db.tar.xz |
[PATCH] md: improve locking on 'safemode' and move superblock writes
When md marks the superblock dirty before a write, it calls
generic_make_request (to write the superblock) from within
generic_make_request (to write the first dirty block), which could cause
problems later.
With this patch, the superblock write is always done by the helper thread, and
write request are delayed until that write completes.
Also, the locking around marking the array dirty and writing the superblock is
improved to avoid possible races.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/raid/md.h')
-rw-r--r-- | include/linux/raid/md.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h index a6a67d102bfa..cfde8f497d6d 100644 --- a/include/linux/raid/md.h +++ b/include/linux/raid/md.h @@ -69,7 +69,7 @@ extern mdk_thread_t * md_register_thread (void (*run) (mddev_t *mddev), extern void md_unregister_thread (mdk_thread_t *thread); extern void md_wakeup_thread(mdk_thread_t *thread); extern void md_check_recovery(mddev_t *mddev); -extern void md_write_start(mddev_t *mddev); +extern int md_write_start(mddev_t *mddev, struct bio *bi); extern void md_write_end(mddev_t *mddev); extern void md_handle_safemode(mddev_t *mddev); extern void md_done_sync(mddev_t *mddev, int blocks, int ok); |