From dfbf9b1f4096bb6656455c991a262ed4976c3b36773685e40f0e299cbedc0450 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Tue, 9 Jan 2018 05:05:57 +0000 Subject: [PATCH] Accepting request 562651 from home:zlliu:branches:Base:System fix bug bsc#1074949 OBS-URL: https://build.opensuse.org/request/show/562651 OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=160 --- ...orrect-the-s-size-1-to-make-max-work.patch | 31 +++++++++++++++++++ mdadm.changes | 6 ++++ mdadm.spec | 2 ++ 3 files changed, 39 insertions(+) create mode 100644 0208-mdadm-grow-correct-the-s-size-1-to-make-max-work.patch diff --git a/0208-mdadm-grow-correct-the-s-size-1-to-make-max-work.patch b/0208-mdadm-grow-correct-the-s-size-1-to-make-max-work.patch new file mode 100644 index 0000000..0a9aeb2 --- /dev/null +++ b/0208-mdadm-grow-correct-the-s-size-1-to-make-max-work.patch @@ -0,0 +1,31 @@ +From 56e1e6ace095893b361f26e750eee58fe3068340 Mon Sep 17 00:00:00 2001 +From: Zhilong Liu +Date: Thu, 23 Nov 2017 11:10:44 +0800 +Subject: [PATCH] mdadm/grow: correct the s->size > 1 to make 'max' work + +s->size > 1 : s->size is '1' when '--grow --size max' +parameter is specified, so correct this test here. + +Fixes: 1b21c449e6f2 ("mdadm/grow: adding a test to ensure resize was required") +Signed-off-by: Zhilong Liu +Signed-off-by: Jes Sorensen +--- + Grow.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Grow.c b/Grow.c +index 80176e3..3ee015b 100644 +--- a/Grow.c ++++ b/Grow.c +@@ -1815,7 +1815,7 @@ int Grow_reshape(char *devname, int fd, + return 1; + } + +- if (array.level > 1 && s->size > 0 && ++ if (array.level > 1 && s->size > 1 && + (array.chunk_size / 1024) > (int)s->size) { + pr_err("component size must be larger than chunk size.\n"); + return 1; +-- +2.6.6 + diff --git a/mdadm.changes b/mdadm.changes index eaf6bb1..4f5e625 100644 --- a/mdadm.changes +++ b/mdadm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 9 03:30:48 UTC 2018 - zlliu@suse.com + +- 0208-mdadm-grow-correct-the-s-size-1-to-make-max-work.patch + (bsc#1074949) + ------------------------------------------------------------------- Wed Jan 3 14:44:06 UTC 2018 - colyli@suse.com diff --git a/mdadm.spec b/mdadm.spec index a3bfe30..041c4ad 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -250,6 +250,7 @@ Patch204: 0204-sysfs-include-faulty-drive-in-disk-count.patch Patch205: 0205-Monitor-msg-Don-t-print-error-message-if-mdmon-doesn.patch Patch206: 0206-imsm-continue-resync-on-3-disk-RAID10.patch Patch207: 0207-managemon-Don-t-add-disk-to-the-array-after-it-has-s.patch +Patch208: 0208-mdadm-grow-correct-the-s-size-1-to-make-max-work.patch %define _udevdir %(pkg-config --variable=udevdir udev) %define _systemdshutdowndir %{_unitdir}/../system-shutdown @@ -467,6 +468,7 @@ programs but with a very different interface. %patch205 -p1 %patch206 -p1 %patch207 -p1 +%patch208 -p1 %build make %{?_smp_mflags} CC="%__cc" CXFLAGS="$RPM_OPT_FLAGS -Wno-error" SUSE=yes