Be more careful checking why reshape has stopped.
If reshape_position reports 'none', check array_state to see if array is still active. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
18eaf9e553
commit
6d5316f66a
8
Grow.c
8
Grow.c
|
@ -2423,8 +2423,14 @@ check_progress:
|
|||
if (sysfs_get_str(info, NULL, "reshape_position", buf, sizeof(buf)) < 0
|
||||
|| strncmp(buf, "none", 4) != 0)
|
||||
return -2; /* abort */
|
||||
else
|
||||
else {
|
||||
/* Maybe racing with array shutdown - check state */
|
||||
if (sysfs_get_str(info, NULL, "array_state", buf, sizeof(buf)) < 0
|
||||
|| strncmp(buf, "inactive", 8) == 0
|
||||
|| strncmp(buf, "clear",5) == 0)
|
||||
return -2; /* abort */
|
||||
return -1; /* complete */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue