aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 */