diff options
author | NeilBrown <neilb@suse.de> | 2013-05-15 11:40:27 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-05-15 11:40:27 +1000 |
commit | a21e848a5578793a5ab6518390433b020785af3b (patch) | |
tree | 6fb7f3d01468e80f399f37e054a6a95c32ccdf8b /Create.c | |
parent | 701d5b4ab5ad72f8998d4398d5b209fea877ce37 (diff) |
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>
Diffstat (limited to 'Create.c')
-rw-r--r-- | Create.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1027,6 +1027,11 @@ int Create(struct supertype *st, char *mddev, 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); |