]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Incremental.c
Incremental: honor an 'enough' flag from external handlers
[thirdparty/mdadm.git] / Incremental.c
index 7ad648a336d8de576afda3e83226037649fa2a71..adef44ee96248faeec116e258a5229d1038212e9 100644 (file)
@@ -258,6 +258,15 @@ int Incremental(char *devname, int verbose, int runstop,
                autof = ci->autof;
 
        if (st->ss->container_content && st->loaded_container) {
+               if ((runstop > 0 && info.container_enough >= 0) ||
+                   info.container_enough > 0)
+                       /* pass */;
+               else {
+                       if (verbose)
+                               fprintf(stderr, Name ": not enough devices to start the container\n");
+                       return 1;
+               }
+
                /* This is a pre-built container array, so we do something
                 * rather different.
                 */