ident.bitmap_fd = -1;
ident.bitmap_file = NULL;
ident.name[0] = 0;
+ ident.container = NULL;
+ ident.member = NULL;
while ((option_index = -1) ,
(opt=getopt_long(argc, argv,
case 'o':
case 'w':
case 'W':
+ case Waitclean:
case 'K': if (!mode) newmode = MISC; break;
}
if (mode && newmode == mode) {
writemostly = 1;
continue;
+ case O(MANAGE,'w'):
+ /* clear write-mostly for following devices */
+ writemostly = 2;
+ continue;
+
+
case O(GROW,'z'):
case O(CREATE,'z'): /* size */
if (size >= 0) {
continue;
case O(ASSEMBLE,'c'): /* config file */
+ case O(INCREMENTAL, 'c'):
case O(MISC, 'c'):
case O(MONITOR,'c'):
if (configfile) {
runstop = -1;
continue;
- case O(MANAGE,'o'):
- if (readonly < 0) {
- fprintf(stderr, Name ": Cannot have both readonly and readwrite\n");
- exit(2);
- }
- readonly = 1;
- continue;
- case O(MANAGE,'w'):
- if (readonly > 0) {
- fprintf(stderr, Name ": Cannot have both readwrite and readonly.\n");
- exit(2);
- }
- readonly = -1;
- continue;
-
case O(MISC,'Q'):
case O(MISC,'D'):
case O(MISC,'E'):
case O(MISC,'o'):
case O(MISC,'w'):
case O(MISC,'W'):
+ case O(MISC, Waitclean):
if (devmode && devmode != opt &&
(devmode == 'E' || (opt == 'E' && devmode != 'Q'))) {
fprintf(stderr, Name ": --examine/-E cannot be given with -%c\n",
exit(2);
}
if (mode == MANAGE || mode == GROW)
- autof=1; /* Don't create */
- mdfd = open_mddev(devlist->devname, autof);
+ mdfd = open_mddev(devlist->devname, 1);
+ else
+ mdfd = create_mddev(devlist->devname, autof);
if (mdfd < 0)
exit(1);
if ((int)ident.super_minor == -2) {
devlist->devname);
rv |= 1;
} else {
- mdfd = open_mddev(devlist->devname,
+ mdfd = create_mddev(devlist->devname,
array_ident->autof ? array_ident->autof : autof);
if (mdfd < 0)
rv |= 1;
rv |= 1;
continue;
}
- mdfd = open_mddev(dv->devname,
+ mdfd = create_mddev(dv->devname,
array_ident->autof ?array_ident->autof : autof);
if (mdfd < 0) {
rv |= 1;
}
for (; array_list; array_list = array_list->next) {
mdu_array_info_t array;
- mdfd = open_mddev(array_list->devname,
+ mdfd = create_mddev(array_list->devname,
array_list->autof ? array_list->autof : autof);
if (mdfd < 0) {
rv |= 1;
break;
}
if (raiddisks == 0) {
- fprintf(stderr, Name ": no raid-disks specified.\n");
+ fprintf(stderr, Name ": no raid-devices specified.\n");
rv = 1;
break;
}
break;
}
if (raiddisks == 0) {
- fprintf(stderr, Name ": no raid-disks specified.\n");
+ fprintf(stderr, Name ": no raid-devices specified.\n");
rv = 1;
break;
}
rv |= ExamineBitmap(dv->devname, brief, ss); continue;
case 'W':
rv |= Wait(dv->devname); continue;
+ case Waitclean:
+ rv |= WaitClean(dv->devname, verbose-quiet); continue;
}
mdfd = open_mddev(dv->devname, 1);
if (mdfd>=0) {