When reshape was invoked during initrd start-up stage array is pushed in to reshape state already, so read only state cannot be set again during reshape continuation. Set previously reshape state has to be reused during reshape continuation. Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> --- Grow.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Grow.c b/Grow.c index 768fc86..d9c2817 100644 --- a/Grow.c +++ b/Grow.c @@ -3773,11 +3773,17 @@ int Grow_continue(int mdfd, struct supertype *st, struct mdinfo *info, { char buf[40]; char *container = NULL; - int err; + int err = 0; - err = sysfs_set_str(info, NULL, "array_state", "readonly"); + /* set read only array state when there is no reshape + * in progress already + */ + if ((sysfs_get_str(info, NULL, "sync_action", buf, 40) != 8) && + (strncmp(buf, "reshape", 7) != 0)) + err = sysfs_set_str(info, NULL, "array_state", "readonly"); if (err) return err; + if (st->ss->external) { fmt_devname(buf, st->container_dev); container = buf; -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html