aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index c6b8d9fd0b04..8fe1abf1b89c 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -4425,7 +4425,8 @@ sync_completed_show(struct mddev *mddev, char *page)
4425 if (!test_bit(MD_RECOVERY_RUNNING, &mddev->recovery)) 4425 if (!test_bit(MD_RECOVERY_RUNNING, &mddev->recovery))
4426 return sprintf(page, "none\n"); 4426 return sprintf(page, "none\n");
4427 4427
4428 if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) 4428 if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery) ||
4429 test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery))
4429 max_sectors = mddev->resync_max_sectors; 4430 max_sectors = mddev->resync_max_sectors;
4430 else 4431 else
4431 max_sectors = mddev->dev_sectors; 4432 max_sectors = mddev->dev_sectors;
@@ -6803,7 +6804,8 @@ static void status_resync(struct seq_file *seq, struct mddev * mddev)
6803 6804
6804 resync = mddev->curr_resync - atomic_read(&mddev->recovery_active); 6805 resync = mddev->curr_resync - atomic_read(&mddev->recovery_active);
6805 6806
6806 if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) 6807 if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery) ||
6808 test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery))
6807 max_sectors = mddev->resync_max_sectors; 6809 max_sectors = mddev->resync_max_sectors;
6808 else 6810 else
6809 max_sectors = mddev->dev_sectors; 6811 max_sectors = mddev->dev_sectors;
@@ -7366,7 +7368,7 @@ void md_do_sync(struct mddev *mddev)
7366 j = mddev->recovery_cp; 7368 j = mddev->recovery_cp;
7367 7369
7368 } else if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) 7370 } else if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery))
7369 max_sectors = mddev->dev_sectors; 7371 max_sectors = mddev->resync_max_sectors;
7370 else { 7372 else {
7371 /* recovery follows the physical size of devices */ 7373 /* recovery follows the physical size of devices */
7372 max_sectors = mddev->dev_sectors; 7374 max_sectors = mddev->dev_sectors;