let '-a' be specified for Incremental mode
From: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
parent
63152c1b33
commit
95b79df03e
4
mdadm.c
4
mdadm.c
|
@ -199,7 +199,8 @@ int main(int argc, char *argv[])
|
|||
case 'G': newmode = GROW;
|
||||
shortopt = short_bitmap_options;
|
||||
break;
|
||||
case 'I': newmode = INCREMENTAL; break;
|
||||
case 'I': newmode = INCREMENTAL;
|
||||
shortopt = short_bitmap_auto_options; break;
|
||||
case AutoDetect:
|
||||
newmode = AUTODETECT; break;
|
||||
|
||||
|
@ -511,6 +512,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
case O(CREATE,'a'):
|
||||
case O(BUILD,'a'):
|
||||
case O(INCREMENTAL,'a'):
|
||||
case O(ASSEMBLE,'a'): /* auto-creation of device node */
|
||||
autof = parse_auto(optarg, "--auto flag", 0);
|
||||
continue;
|
||||
|
|
7
util.c
7
util.c
|
@ -884,11 +884,14 @@ int find_free_devnum(int use_partitions)
|
|||
for (devnum = 127; devnum != 128;
|
||||
devnum = devnum ? devnum-1 : (1<<22)-1) {
|
||||
char *dn;
|
||||
if (mddev_busy(use_partitions ? (-1-devnum) : devnum))
|
||||
int _devnum;
|
||||
|
||||
_devnum = use_partitions ? (-1-devnum) : devnum;
|
||||
if (mddev_busy(_devnum))
|
||||
continue;
|
||||
/* make sure it is new to /dev too, at least as a
|
||||
* non-standard */
|
||||
dn = map_dev(dev2major(devnum), dev2minor(devnum), 0);
|
||||
dn = map_dev(dev2major(_devnum), dev2minor(_devnum), 0);
|
||||
if (dn && ! is_standard(dn, NULL))
|
||||
continue;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue