summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Zylowski <michal.zylowski@intel.com>2018-05-29 15:47:09 +0200
committerJes Sorensen <jsorensen@fb.com>2018-05-31 17:29:04 +0200
commit59632db96bdd09b44e9927f63a67cccbe8b15cdf (patch)
treea154255018c37cd0d11faafad7fd908cc86413f0
parentsuper-intel: Do not truncate last character of volume name (diff)
downloadmdadm-59632db96bdd09b44e9927f63a67cccbe8b15cdf.tar.xz
mdadm-59632db96bdd09b44e9927f63a67cccbe8b15cdf.zip
imsm: Do not block volume creation when container has disks with mixed sector size
Currently when created container keeps disks with mixed sector size (few 4K disks and some 512 disks) there is no possibility to create volume from disks with one sector size. Allow volume creation when given disks are related with mixed container. Signed-off-by: Michal Zylowski <michal.zylowski@intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
-rw-r--r--super-intel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/super-intel.c b/super-intel.c
index aa93a9e9..12f60f65 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -5616,6 +5616,11 @@ static int add_to_super_imsm_volume(struct supertype *st, mdu_disk_info_t *dk,
return 1;
}
+ if (mpb->num_disks == 0)
+ if (!get_dev_sector_size(dl->fd, dl->devname,
+ &super->sector_size))
+ return 1;
+
if (!drive_validate_sector_size(super, dl)) {
pr_err("Combining drives of different sector size in one volume is not allowed\n");
return 1;