]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] md: fix recent breakage of md/raid1 array checking
authorNeilBrown <neilb@suse.de>
Sun, 27 Aug 2006 08:23:50 +0000 (01:23 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 27 Aug 2006 18:01:31 +0000 (11:01 -0700)
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>
drivers/md/raid1.c

index 1efe22a2d0410f2abb6a5704ac24d015407fd6cc..87bfe9e7d8cad704fc598a727beb14cc978c0088 100644 (file)
@@ -1625,15 +1625,16 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
                return 0;
        }
 
-       /* before building a request, check if we can skip these blocks..
-        * This call the bitmap_start_sync doesn't actually record anything
-        */
        if (mddev->bitmap == NULL &&
            mddev->recovery_cp == MaxSector &&
+           !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) &&
            conf->fullsync == 0) {
                *skipped = 1;
                return max_sector - sector_nr;
        }
+       /* before building a request, check if we can skip these blocks..
+        * This call the bitmap_start_sync doesn't actually record anything
+        */
        if (!bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, 1) &&
            !conf->fullsync && !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) {
                /* We can skip this block, and probably several more */