Create: over-ride "start_ro" setting when creating an array.
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>
This commit is contained in:
parent
701d5b4ab5
commit
a21e848a55
5
Create.c
5
Create.c
|
@ -1027,6 +1027,11 @@ int Create(struct supertype *st, char *mddev,
|
||||||
ioctl(mdfd, STOP_ARRAY, NULL);
|
ioctl(mdfd, STOP_ARRAY, NULL);
|
||||||
goto abort;
|
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)
|
if (c->verbose >= 0)
|
||||||
pr_err("array %s started.\n", mddev);
|
pr_err("array %s started.\n", mddev);
|
||||||
|
|
Loading…
Reference in New Issue