summaryrefslogtreecommitdiff
path: root/debian/patches/0016-imsm-Do-not-block-volume-creation-when-container-has.patch
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2018-06-26 15:38:57 +0100
committerDimitri John Ledkov <xnox@ubuntu.com>2018-06-26 15:38:57 +0100
commit9421e599c44cd50d3df4cd019cd3c53d9320e93d (patch)
tree2d9606679ad49fbc9f9cf72b3a3a87d7a6dc8fff /debian/patches/0016-imsm-Do-not-block-volume-creation-when-container-has.patch
parentec9bfc63255cdf01a67171d1228f562c927c6d36 (diff)
Cherrypick master patches up to 4th of June 2018.debian/4.1_rc1-3archive/debian/4.1_rc1-3
Diffstat (limited to 'debian/patches/0016-imsm-Do-not-block-volume-creation-when-container-has.patch')
-rw-r--r--debian/patches/0016-imsm-Do-not-block-volume-creation-when-container-has.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/debian/patches/0016-imsm-Do-not-block-volume-creation-when-container-has.patch b/debian/patches/0016-imsm-Do-not-block-volume-creation-when-container-has.patch
new file mode 100644
index 00000000..e86e4bce
--- /dev/null
+++ b/debian/patches/0016-imsm-Do-not-block-volume-creation-when-container-has.patch
@@ -0,0 +1,36 @@
+From 59632db96bdd09b44e9927f63a67cccbe8b15cdf Mon Sep 17 00:00:00 2001
+From: Michal Zylowski <michal.zylowski@intel.com>
+Date: Tue, 29 May 2018 15:47:09 +0200
+Subject: [PATCH 16/26] 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>
+---
+ super-intel.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+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;
+--
+2.17.1
+