aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@cse.unsw.edu.au>2005-08-04 15:53:35 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-04 16:00:54 -0400
commit6b8b3e8a8b3e62b4209eaa36697e3c9df457e196 (patch)
tree8b537e5b358cbe93cd8e8ea54a9281d56a7ce205 /drivers/md/md.c
parente3b9703e27aab3839dcdb76b00d98428b67d25b0 (diff)
[PATCH] md: make sure md bitmap updates are flushed when array is stopped.
The recent change to never ignore the bitmap, revealed that the bitmap isn't begin flushed properly when an array is stopped. We call bitmap_daemon_work three times as there is a three-stage pipeline for flushing updates to the bitmap file. 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 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 9fd4dbea0d0..480f658db6f 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1798,6 +1798,8 @@ static int do_md_stop(mddev_t * mddev, int ro)
1798 goto out; 1798 goto out;
1799 mddev->ro = 1; 1799 mddev->ro = 1;
1800 } else { 1800 } else {
1801 bitmap_flush(mddev);
1802 wait_event(mddev->sb_wait, atomic_read(&mddev->pending_writes)==0);
1801 if (mddev->ro) 1803 if (mddev->ro)
1802 set_disk_ro(disk, 0); 1804 set_disk_ro(disk, 0);
1803 blk_queue_make_request(mddev->queue, md_fail_request); 1805 blk_queue_make_request(mddev->queue, md_fail_request);