.TP
.BR \-\-wait\-clean
-For each md device given, arrange for the array to be marked clean as
-soon as possible. Also, quiesce resync so that the monitor for external
-metadata arrays (mdmon) has an opportunity to checkpoint the resync
-position.
+For each md device given, or each device in /proc/mdstat if
+.B \-\-scan
+is given, arrange for the array to be marked clean as soon as possible.
+Also, quiesce resync so that the monitor for external metadata arrays
+(mdmon) has an opportunity to checkpoint the resync position.
.I mdadm
will return with success if the array uses external metadata and we
successfully waited. For native arrays this returns immediately as the
SparcAdjust, ss, homehost);
} else {
if (devlist == NULL) {
- if (devmode=='D' && scan) {
- /* apply --detail to all devices in /proc/mdstat */
+ if ((devmode=='D' || devmode == Waitclean) && scan) {
+ /* apply --detail or --wait-clean to
+ * all devices in /proc/mdstat
+ */
struct mdstat_ent *ms = mdstat_read(0, 1);
struct mdstat_ent *e;
+ int v = verbose>1?0:verbose+1;
+
for (e=ms ; e ; e=e->next) {
char *name = get_md_name(e->devnum);
e->dev);
continue;
}
- rv |= Detail(name, verbose>1?0:verbose+1,
- export, test, homehost);
+ if (devmode == 'D')
+ rv |= Detail(name, v,
+ export, test,
+ homehost);
+ else
+ rv |= WaitClean(name, v);
put_md_name(name);
}
} else if (devmode == 'S' && scan) {