aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid10.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-02-06 04:39:50 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-06 13:41:18 -0500
commitb47490c9bc73d0b34e4c194db40de183e592e446 (patch)
tree8334581aff7aa0b199df04c6f9d707c1902ad14f /drivers/md/raid10.c
parent66c811e99322767bad5db4368de93aac604f02a2 (diff)
md: Update md bitmap during resync.
Currently an md array with a write-intent bitmap does not updated that bitmap to reflect successful partial resync. Rather the entire bitmap is updated when the resync completes. This is because there is no guarentee that resync requests will complete in order, and tracking each request individually is unnecessarily burdensome. However there is value in regularly updating the bitmap, so add code to periodically pause while all pending sync requests complete, then update the bitmap. Doing this only every few seconds (the same as the bitmap update time) does not notciably affect resync performance. [snitzer@gmail.com: export bitmap_cond_end_sync] Signed-off-by: Neil Brown <neilb@suse.de> Cc: "Mike Snitzer" <snitzer@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r--drivers/md/raid10.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 5cdcc9386200..ba125277c6c4 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -1670,6 +1670,8 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
1670 if (!go_faster && conf->nr_waiting) 1670 if (!go_faster && conf->nr_waiting)
1671 msleep_interruptible(1000); 1671 msleep_interruptible(1000);
1672 1672
1673 bitmap_cond_end_sync(mddev->bitmap, sector_nr);
1674
1673 /* Again, very different code for resync and recovery. 1675 /* Again, very different code for resync and recovery.
1674 * Both must result in an r10bio with a list of bios that 1676 * Both must result in an r10bio with a list of bios that
1675 * have bi_end_io, bi_sector, bi_bdev set, 1677 * have bi_end_io, bi_sector, bi_bdev set,