dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

Blame SOURCES/0002-imsm-Allow-create-RAID-volume-with-link-to-container.patch

59ea72
From b91ad097d6eecb85cf28915836370288709fbda8 Mon Sep 17 00:00:00 2001
59ea72
From: Michal Zylowski <michal.zylowski@intel.com>
59ea72
Date: Wed, 4 Apr 2018 14:20:17 +0200
59ea72
Subject: [RHEL7.5 PATCH 02/26] imsm: Allow create RAID volume with link to
59ea72
 container
59ea72
59ea72
After 1db03765("Subdevs can't be all missing when create raid device")
59ea72
raid volume can't be created with link to container. This feature should
59ea72
not be blocked in Create function.  IMSM code forbids creation of
59ea72
container with missing disk, so case like all dev's missing is already
59ea72
handled.
59ea72
59ea72
Permit IMSM volume creation when devices are given as link to container.
59ea72
59ea72
Signed-off-by: Michal Zylowski <michal.zylowski@intel.com>
59ea72
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
59ea72
---
59ea72
 Create.c | 2 +-
59ea72
 1 file changed, 1 insertion(+), 1 deletion(-)
59ea72
59ea72
diff --git a/Create.c b/Create.c
59ea72
index 50142d8..04b1dfc 100644
59ea72
--- a/Create.c
59ea72
+++ b/Create.c
59ea72
@@ -475,7 +475,7 @@ int Create(struct supertype *st, char *mddev,
59ea72
 			close(fd);
59ea72
 		}
59ea72
 	}
59ea72
-	if (missing_disks == dnum) {
59ea72
+	if (missing_disks == dnum && !have_container) {
59ea72
 		pr_err("Subdevs can't be all missing\n");
59ea72
 		return 1;
59ea72
 	}
59ea72
-- 
59ea72
2.7.4
59ea72