Blame SOURCES/0034-tests-fdisk-make-sure-we-use-the-same-sizes-for-MD-d.patch

936174
From 60f97394878d8b540ee6a4fb9c9edaae2f90d0d0 Mon Sep 17 00:00:00 2001
936174
From: Karel Zak <kzak@redhat.com>
936174
Date: Tue, 17 Dec 2019 18:10:31 +0100
936174
Subject: [PATCH] tests: (fdisk) make sure we use the same sizes for MD devices
936174
936174
It seems on some kernels MD can return error if the devices in RAID
936174
have different size
936174
936174
 # mdadm -q --create /dev/md8 --chunk=64 --level=0 --raid-devices=2 /dev/sda1 /dev/sda2
936174
 mdadm: RUN_ARRAY failed: Unknown error 524
936174
936174
 # dmesg
936174
 ...
936174
 [ 1485.148435] md/raid0:md8: cannot assemble multi-zone RAID0 with default_layout setting
936174
 [ 1485.152306] md/raid0: please set raid.default_layout to 1 or 2
936174
 [ 1485.154050] md: pers->run() failed ...
936174
 [ 1485.154104] md: md8 stopped.
936174
936174
Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1784534
936174
Signed-off-by: Karel Zak <kzak@redhat.com>
936174
---
936174
 tests/expected/fdisk/align-512-4K-md | 12 ++++++------
936174
 tests/ts/fdisk/align-512-4K-md       |  4 ++--
936174
 2 files changed, 8 insertions(+), 8 deletions(-)
936174
936174
diff --git a/tests/expected/fdisk/align-512-4K-md b/tests/expected/fdisk/align-512-4K-md
936174
index caca03154..3690c04c2 100644
936174
--- a/tests/expected/fdisk/align-512-4K-md
936174
+++ b/tests/expected/fdisk/align-512-4K-md
936174
@@ -16,7 +16,7 @@ Created a new <removed>.
936174
 Command (m for help): Partition type
936174
    p   primary (1 primary, 0 extended, 3 free)
936174
    e   extended (container for logical partitions)
936174
-Select (default p): Partition number (2-4, default 2): First sector (43008-102399, default 43008): Last sector, +sectors or +size{K,M,G,T,P} (43008-102399, default 102399): 
936174
+Select (default p): Partition number (2-4, default 2): First sector (51199-102399, default 51200): Last sector, +sectors or +size{K,M,G,T,P} (51200-102399, default 102399): 
936174
 Created a new <removed>.
936174
 
936174
 Command (m for help): Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
936174
@@ -27,8 +27,8 @@ Disklabel type: dos
936174
 Disk identifier: <removed>
936174
 
936174
 Device     Boot Start    End Sectors Size Id Type
936174
-<removed>1        2048  43007   40960  20M 83 Linux
936174
-<removed>2       43008 102399   59392  29M 83 Linux
936174
+<removed>1        2048  51198   49151  24M 83 Linux
936174
+<removed>2       51200 100350   49151  24M 83 Linux
936174
 
936174
 Command (m for help): The partition table has been altered.
936174
 Calling ioctl() to re-read partition table.
936174
@@ -49,16 +49,16 @@ Created a new <removed>.
936174
 Command (m for help): Partition type
936174
    p   primary (0 primary, 0 extended, 4 free)
936174
    e   extended (container for logical partitions)
936174
-Select (default p): Partition number (1-4, default 1): First sector (2048-100095, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-100095, default 100095): 
936174
+Select (default p): Partition number (1-4, default 1): First sector (2048-97791, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-97791, default 97791): 
936174
 Created a new <removed>.
936174
 
936174
 Command (m for help): Partition type
936174
    p   primary (1 primary, 0 extended, 3 free)
936174
    e   extended (container for logical partitions)
936174
-Select (default p): Partition number (2-4, default 2): First sector (22528-100095, default 22528): Last sector, +sectors or +size{K,M,G,T,P} (22528-100095, default 100095): 
936174
+Select (default p): Partition number (2-4, default 2): First sector (22528-97791, default 22528): Last sector, +sectors or +size{K,M,G,T,P} (22528-97791, default 97791): 
936174
 Created a new <removed>.
936174
 
936174
-Command (m for help): Disk <removed>: 48.9 MiB, 51249152 bytes, 100096 sectors
936174
+Command (m for help): Disk <removed>: 47.8 MiB, 50069504 bytes, 97792 sectors
936174
 Units: sectors of 1 * 512 = 512 bytes
936174
 Sector size (logical/physical): 512 bytes / 4096 bytes
936174
 I/O size (minimum/optimal): 65536 bytes / <removed> bytes
936174
diff --git a/tests/ts/fdisk/align-512-4K-md b/tests/ts/fdisk/align-512-4K-md
936174
index 7f60a654f..68aaff0b7 100755
936174
--- a/tests/ts/fdisk/align-512-4K-md
936174
+++ b/tests/ts/fdisk/align-512-4K-md
936174
@@ -41,12 +41,12 @@ n
936174
 p
936174
 1
936174
 
936174
-+20M
936174
++49150
936174
 n
936174
 p
936174
 2
936174
 
936174
-
936174
++49150
936174
 p
936174
 w
936174
 q
936174
-- 
936174
2.21.0
936174