diff options
-rw-r--r-- | drivers/md/raid10.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 6ddae2501b9..f2f4a6e4f4f 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -2909,14 +2909,13 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr, */ if (mddev->bitmap == NULL && mddev->recovery_cp == MaxSector && + mddev->reshape_position == MaxSector && + !test_bit(MD_RECOVERY_SYNC, &mddev->recovery) && !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) && + !test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery) && conf->fullsync == 0) { *skipped = 1; - max_sector = mddev->dev_sectors; - if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery) || - test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) - max_sector = mddev->resync_max_sectors; - return max_sector - sector_nr; + return mddev->dev_sectors - sector_nr; } skipped: |