aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-08-27 04:23:50 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-08-27 14:01:31 -0400
commit6394cca54894f6a9bcf927ab78d28985944298ff (patch)
tree8b8376691f329c3bcc491fd2d0425c4e6278c5e3
parent84692195969b83f0ba57dc33ecf73e6c124dd186 (diff)
[PATCH] md: fix recent breakage of md/raid1 array checking
A recent patch broke the ability to do a user-request check of a raid1. This patch fixes the breakage and also moves a comment that was dislocated by the same patch. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/md/raid1.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 1efe22a2d041..87bfe9e7d8ca 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1625,15 +1625,16 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
1625 return 0; 1625 return 0;
1626 } 1626 }
1627 1627
1628 /* before building a request, check if we can skip these blocks..
1629 * This call the bitmap_start_sync doesn't actually record anything
1630 */
1631 if (mddev->bitmap == NULL && 1628 if (mddev->bitmap == NULL &&
1632 mddev->recovery_cp == MaxSector && 1629 mddev->recovery_cp == MaxSector &&
1630 !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) &&
1633 conf->fullsync == 0) { 1631 conf->fullsync == 0) {
1634 *skipped = 1; 1632 *skipped = 1;
1635 return max_sector - sector_nr; 1633 return max_sector - sector_nr;
1636 } 1634 }
1635 /* before building a request, check if we can skip these blocks..
1636 * This call the bitmap_start_sync doesn't actually record anything
1637 */
1637 if (!bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, 1) && 1638 if (!bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, 1) &&
1638 !conf->fullsync && !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) { 1639 !conf->fullsync && !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) {
1639 /* We can skip this block, and probably several more */ 1640 /* We can skip this block, and probably several more */