If module parameter start_ro is set, arrays start readonly.
This is OK when assembling, but is very surprising when creating
an array as the resync won't start.
So over-ride the setting (unless --read-only was given) make
arrays RW when created.
Signed-off-by: NeilBrown <neilb@suse.de>
ioctl(mdfd, STOP_ARRAY, NULL);
goto abort;
}
+ /* if start_ro module parameter is set, array is
+ * auto-read-only, which is bad as the resync won't
+ * start. So lets make it read-write now.
+ */
+ ioctl(mdfd, RESTART_ARRAY_RW, NULL);
}
if (c->verbose >= 0)
pr_err("array %s started.\n", mddev);