From: NeilBrown Date: Wed, 15 May 2013 01:40:27 +0000 (+1000) Subject: Create: over-ride "start_ro" setting when creating an array. X-Git-Tag: mdadm-3.3-rc1~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a21e848a5578793a5ab6518390433b020785af3b;p=thirdparty%2Fmdadm.git 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 --- diff --git a/Create.c b/Create.c index e7ed09b4..fe1d4e97 100644 --- a/Create.c +++ b/Create.c @@ -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);