summaryrefslogtreecommitdiffstats
path: root/Grow.c
diff options
context:
space:
mode:
Diffstat (limited to 'Grow.c')
-rw-r--r--Grow.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Grow.c b/Grow.c
index 14e48f56..fc809c63 100644
--- a/Grow.c
+++ b/Grow.c
@@ -815,6 +815,14 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file,
}
if (comp >= nstripe)
break;
+ if (comp == 0) {
+ /* Maybe it finished already */
+ char action[20];
+ if (sysfs_get_str(sra, NULL, "sync_action",
+ action, 20) > 0 &&
+ strncmp(action, "reshape", 7) != 0)
+ break;
+ }
sleep(1);
}