]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
imsm: Allow create RAID volume with link to container
authorMichal Zylowski <michal.zylowski@intel.com>
Wed, 4 Apr 2018 12:20:17 +0000 (14:20 +0200)
committerJes Sorensen <jsorensen@fb.com>
Tue, 10 Apr 2018 20:12:00 +0000 (16:12 -0400)
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>
Create.c

index 50142d815901f1798333ebf8a43216c3e2bf01f1..04b1dfc9a6c527625d62e72744905e0ec117fd43 100644 (file)
--- 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;
        }