imsm: add handling of sync_action is equal to 'idle'
After resync is stopped sync_action value become 'idle'. We treat this case as normal termination of waiting, not as error. Signed-off-by: Alexey Obitotskiy <aleksey.obitotskiy@intel.com> Reviewed-by: Pawel Baldysiak <pawel.baldysiak@intel.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
This commit is contained in:
parent
955aa6cf75
commit
b2be2b628b
|
@ -10423,6 +10423,8 @@ int wait_for_reshape_imsm(struct mdinfo *sra, int ndata)
|
||||||
if (sysfs_get_str(sra, NULL, "sync_action",
|
if (sysfs_get_str(sra, NULL, "sync_action",
|
||||||
action, 20) > 0 &&
|
action, 20) > 0 &&
|
||||||
strncmp(action, "reshape", 7) != 0) {
|
strncmp(action, "reshape", 7) != 0) {
|
||||||
|
if (strncmp(action, "idle", 4) == 0)
|
||||||
|
break;
|
||||||
close(fd);
|
close(fd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -10432,9 +10434,9 @@ int wait_for_reshape_imsm(struct mdinfo *sra, int ndata)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
} while (completed < position_to_set);
|
} while (completed < position_to_set);
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
Loading…
Reference in New Issue