diff options
Diffstat (limited to 'Grow.c')
-rw-r--r-- | Grow.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -809,12 +809,20 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file, /* wait for reshape to pass the critical region */ while(1) { unsigned long long comp; + char a[20]; + if (sysfs_get_ll(sra, NULL, "sync_completed", &comp)<0) { sleep(5); break; } if (comp >= nstripe) break; + + /* perhaps the entire reshape has completed */ + if (comp == 0 && + sysfs_get_str(sra, NULL, "sync_action", a, sizeof(a)) == 0 && + strncmp(a, "idle", 4) == 0) + break; sleep(1); } |