Accepting request 562652 from Base:System

fix bug bsc#1074949 (forwarded request 562651 from zlliu)

OBS-URL: https://build.opensuse.org/request/show/562652
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mdadm?expand=0&rev=113
This commit is contained in:
Dominique Leuenberger 2018-01-16 08:31:30 +00:00 committed by Git OBS Bridge
commit 78e701d25f
3 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,31 @@
From 56e1e6ace095893b361f26e750eee58fe3068340 Mon Sep 17 00:00:00 2001
From: Zhilong Liu <zlliu@suse.com>
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 <zlliu@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
---
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

View File

@ -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

View File

@ -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