diff options
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index c7b7656f9aa5..8e65986bc63f 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -2165,7 +2165,9 @@ action_show(mddev_t *mddev, char *page) | |||
2165 | char *type = "idle"; | 2165 | char *type = "idle"; |
2166 | if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) || | 2166 | if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) || |
2167 | test_bit(MD_RECOVERY_NEEDED, &mddev->recovery)) { | 2167 | test_bit(MD_RECOVERY_NEEDED, &mddev->recovery)) { |
2168 | if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { | 2168 | if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) |
2169 | type = "reshape"; | ||
2170 | else if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { | ||
2169 | if (!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) | 2171 | if (!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) |
2170 | type = "resync"; | 2172 | type = "resync"; |
2171 | else if (test_bit(MD_RECOVERY_CHECK, &mddev->recovery)) | 2173 | else if (test_bit(MD_RECOVERY_CHECK, &mddev->recovery)) |
@@ -4088,8 +4090,10 @@ static void status_resync(struct seq_file *seq, mddev_t * mddev) | |||
4088 | seq_printf(seq, "] "); | 4090 | seq_printf(seq, "] "); |
4089 | } | 4091 | } |
4090 | seq_printf(seq, " %s =%3u.%u%% (%llu/%llu)", | 4092 | seq_printf(seq, " %s =%3u.%u%% (%llu/%llu)", |
4093 | (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)? | ||
4094 | "reshape" : | ||
4091 | (test_bit(MD_RECOVERY_SYNC, &mddev->recovery) ? | 4095 | (test_bit(MD_RECOVERY_SYNC, &mddev->recovery) ? |
4092 | "resync" : "recovery"), | 4096 | "resync" : "recovery")), |
4093 | per_milli/10, per_milli % 10, | 4097 | per_milli/10, per_milli % 10, |
4094 | (unsigned long long) resync, | 4098 | (unsigned long long) resync, |
4095 | (unsigned long long) max_blocks); | 4099 | (unsigned long long) max_blocks); |
@@ -4543,7 +4547,9 @@ static void md_do_sync(mddev_t *mddev) | |||
4543 | */ | 4547 | */ |
4544 | max_sectors = mddev->resync_max_sectors; | 4548 | max_sectors = mddev->resync_max_sectors; |
4545 | mddev->resync_mismatches = 0; | 4549 | mddev->resync_mismatches = 0; |
4546 | } else | 4550 | } else if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) |
4551 | max_sectors = mddev->size << 1; | ||
4552 | else | ||
4547 | /* recovery follows the physical size of devices */ | 4553 | /* recovery follows the physical size of devices */ |
4548 | max_sectors = mddev->size << 1; | 4554 | max_sectors = mddev->size << 1; |
4549 | 4555 | ||
@@ -4679,6 +4685,8 @@ static void md_do_sync(mddev_t *mddev) | |||
4679 | mddev->pers->sync_request(mddev, max_sectors, &skipped, 1); | 4685 | mddev->pers->sync_request(mddev, max_sectors, &skipped, 1); |
4680 | 4686 | ||
4681 | if (!test_bit(MD_RECOVERY_ERR, &mddev->recovery) && | 4687 | if (!test_bit(MD_RECOVERY_ERR, &mddev->recovery) && |
4688 | test_bit(MD_RECOVERY_SYNC, &mddev->recovery) && | ||
4689 | !test_bit(MD_RECOVERY_CHECK, &mddev->recovery) && | ||
4682 | mddev->curr_resync > 2 && | 4690 | mddev->curr_resync > 2 && |
4683 | mddev->curr_resync >= mddev->recovery_cp) { | 4691 | mddev->curr_resync >= mddev->recovery_cp) { |
4684 | if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { | 4692 | if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { |