summaryrefslogtreecommitdiffstats
path: root/Incremental.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2010-05-26 13:22:36 -0700
committerDan Williams <dan.j.williams@intel.com>2010-05-26 13:22:36 -0700
commit97b4d0e971b20cea66b4a2dd04968cae79a3c2e6 (patch)
tree431f304f86a6f2b4cc89941b655506e99b29baa5 /Incremental.c
parent4460f8f7c344a0e8c8d454edcaf392e85912c76e (diff)
downloadmdadm-97b4d0e971b20cea66b4a2dd04968cae79a3c2e6.tar.gz
mdadm-97b4d0e971b20cea66b4a2dd04968cae79a3c2e6.tar.xz
mdadm-97b4d0e971b20cea66b4a2dd04968cae79a3c2e6.zip
Incremental: honor an 'enough' flag from external handlers
This is needed for imsm where: 1/ we want to report raid_disks as zero to allow mdadm -As to incorporate all spares 2/ we can't determine stale disks by looking at the event counts. 3/ we can't see per-subarray expectations with the info returned from the container level ->getinfo_super() Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'Incremental.c')
-rw-r--r--Incremental.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Incremental.c b/Incremental.c
index 7ad648a..adef44e 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -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.
*/