diff options
-rw-r--r-- | drivers/md/raid1.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 1cbf51fbd43..2da9d3ba902 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -1310,7 +1310,7 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i | |||
1310 | * This call the bitmap_start_sync doesn't actually record anything | 1310 | * This call the bitmap_start_sync doesn't actually record anything |
1311 | */ | 1311 | */ |
1312 | if (!bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, 1) && | 1312 | if (!bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, 1) && |
1313 | !conf->fullsync) { | 1313 | !conf->fullsync && !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) { |
1314 | /* We can skip this block, and probably several more */ | 1314 | /* We can skip this block, and probably several more */ |
1315 | *skipped = 1; | 1315 | *skipped = 1; |
1316 | return sync_blocks; | 1316 | return sync_blocks; |
@@ -1387,7 +1387,8 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i | |||
1387 | still_degraded = 1; | 1387 | still_degraded = 1; |
1388 | continue; | 1388 | continue; |
1389 | } else if (!test_bit(In_sync, &conf->mirrors[i].rdev->flags) || | 1389 | } else if (!test_bit(In_sync, &conf->mirrors[i].rdev->flags) || |
1390 | sector_nr + RESYNC_SECTORS > mddev->recovery_cp) { | 1390 | sector_nr + RESYNC_SECTORS > mddev->recovery_cp || |
1391 | test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) { | ||
1391 | bio->bi_rw = WRITE; | 1392 | bio->bi_rw = WRITE; |
1392 | bio->bi_end_io = end_sync_write; | 1393 | bio->bi_end_io = end_sync_write; |
1393 | write_targets ++; | 1394 | write_targets ++; |
@@ -1421,8 +1422,9 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i | |||
1421 | break; | 1422 | break; |
1422 | if (sync_blocks == 0) { | 1423 | if (sync_blocks == 0) { |
1423 | if (!bitmap_start_sync(mddev->bitmap, sector_nr, | 1424 | if (!bitmap_start_sync(mddev->bitmap, sector_nr, |
1424 | &sync_blocks, still_degraded) && | 1425 | &sync_blocks, still_degraded) && |
1425 | !conf->fullsync) | 1426 | !conf->fullsync && |
1427 | !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) | ||
1426 | break; | 1428 | break; |
1427 | if (sync_blocks < (PAGE_SIZE>>9)) | 1429 | if (sync_blocks < (PAGE_SIZE>>9)) |
1428 | BUG(); | 1430 | BUG(); |