Restore ability to create imsm array from specific devices.
A recent change to improve error messages make it not possible to create an array from devices that are 'busy'. However if they are made busy by a container, then the create should be allowed. So move one of the error messages later. Reported-by: "Wojcik, Krzysztof" <krzysztof.wojcik@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
3d9d188087
commit
58b3c6976a
8
Create.c
8
Create.c
|
@ -302,7 +302,7 @@ int Create(struct supertype *st, char *mddev,
|
|||
missing_disks ++;
|
||||
continue;
|
||||
}
|
||||
dfd = open(dname, O_RDONLY|O_EXCL);
|
||||
dfd = open(dname, O_RDONLY);
|
||||
if (dfd < 0) {
|
||||
fprintf(stderr, Name ": cannot open %s: %s\n",
|
||||
dname, strerror(errno));
|
||||
|
@ -345,6 +345,12 @@ int Create(struct supertype *st, char *mddev,
|
|||
}
|
||||
|
||||
if (!st) {
|
||||
int dfd = open(dname, O_RDONLY|O_EXCL);
|
||||
if (dfd < 0) {
|
||||
fprintf(stderr, Name ": cannot open %s: %s\n",
|
||||
dname, strerror(errno));
|
||||
exit(2);
|
||||
}
|
||||
fprintf(stderr, Name ": device %s not suitable "
|
||||
"for any style of array\n",
|
||||
dname);
|
||||
|
|
Loading…
Reference in New Issue