summaryrefslogtreecommitdiffstats
path: root/Create.c
diff options
context:
space:
mode:
authorMichal Zylowski <michal.zylowski@intel.com>2018-04-04 14:20:17 +0200
committerJes Sorensen <jsorensen@fb.com>2018-04-10 22:12:00 +0200
commitb91ad097d6eecb85cf28915836370288709fbda8 (patch)
tree3baa253ab32b9899e87637d2b49b0a6f054e690e /Create.c
parentmdadm: fix use-after-free after free_mdstat (diff)
downloadmdadm-b91ad097d6eecb85cf28915836370288709fbda8.tar.xz
mdadm-b91ad097d6eecb85cf28915836370288709fbda8.zip
imsm: Allow create RAID volume with link to container
After 1db03765("Subdevs can't be all missing when create raid device") raid volume can't be created with link to container. This feature should not be blocked in Create function. IMSM code forbids creation of container with missing disk, so case like all dev's missing is already handled. Permit IMSM volume creation when devices are given as link to container. Signed-off-by: Michal Zylowski <michal.zylowski@intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'Create.c')
-rw-r--r--Create.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Create.c b/Create.c
index 50142d81..04b1dfc9 100644
--- a/Create.c
+++ b/Create.c
@@ -475,7 +475,7 @@ int Create(struct supertype *st, char *mddev,
close(fd);
}
}
- if (missing_disks == dnum) {
+ if (missing_disks == dnum && !have_container) {
pr_err("Subdevs can't be all missing\n");
return 1;
}