Blame SOURCES/0016-imsm-Do-not-block-volume-creation-when-container-has.patch

d922d5
From 59632db96bdd09b44e9927f63a67cccbe8b15cdf Mon Sep 17 00:00:00 2001
d922d5
From: Michal Zylowski <michal.zylowski@intel.com>
d922d5
Date: Tue, 29 May 2018 15:47:09 +0200
d922d5
Subject: [RHEL7.5 PATCH 16/26] imsm: Do not block volume creation when
d922d5
 container has disks with mixed sector size
d922d5
d922d5
Currently when created container keeps disks with mixed sector size (few
d922d5
4K disks and some 512 disks) there is no possibility to create volume from
d922d5
disks with one sector size.
d922d5
Allow volume creation when given disks are related with mixed container.
d922d5
d922d5
Signed-off-by: Michal Zylowski <michal.zylowski@intel.com>
d922d5
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
d922d5
---
d922d5
 super-intel.c | 5 +++++
d922d5
 1 file changed, 5 insertions(+)
d922d5
d922d5
diff --git a/super-intel.c b/super-intel.c
d922d5
index aa93a9e..12f60f6 100644
d922d5
--- a/super-intel.c
d922d5
+++ b/super-intel.c
d922d5
@@ -5616,6 +5616,11 @@ static int add_to_super_imsm_volume(struct supertype *st, mdu_disk_info_t *dk,
d922d5
 		return 1;
d922d5
 	}
d922d5
 
d922d5
+	if (mpb->num_disks == 0)
d922d5
+		if (!get_dev_sector_size(dl->fd, dl->devname,
d922d5
+					 &super->sector_size))
d922d5
+			return 1;
d922d5
+
d922d5
 	if (!drive_validate_sector_size(super, dl)) {
d922d5
 		pr_err("Combining drives of different sector size in one volume is not allowed\n");
d922d5
 		return 1;
d922d5
-- 
d922d5
2.7.4
d922d5