summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Grow.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Grow.c b/Grow.c
index fe42b2b..f2cf46a 100644
--- a/Grow.c
+++ b/Grow.c
@@ -3844,9 +3844,11 @@ int progress_reshape(struct mdinfo *info, struct reshape *reshape,
* So we need these extra tests.
*/
if (completed == 0 && advancing
+ && strncmp(action, "idle", 4) == 0
&& info->reshape_progress > 0)
break;
if (completed == 0 && !advancing
+ && strncmp(action, "idle", 4) == 0
&& info->reshape_progress < (info->component_size
* reshape->after.data_disks))
break;
@@ -3863,7 +3865,7 @@ int progress_reshape(struct mdinfo *info, struct reshape *reshape,
char action[20];
if (sysfs_get_str(info, NULL, "sync_action",
action, 20) > 0 &&
- strncmp(action, "reshape", 7) == 0)
+ strncmp(action, "idle", 4) == 0)
completed = max_progress;
}