linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mdadm/grow: correct the s->size > 1 to make 'max' work
@ 2017-11-23  3:10 Zhilong Liu
  2017-11-28 16:07 ` Jes Sorensen
  0 siblings, 1 reply; 2+ messages in thread
From: Zhilong Liu @ 2017-11-23  3:10 UTC (permalink / raw)
  To: jsorensen; +Cc: linux-raid, Zhilong Liu

To fix the commit: 1b21c449e6f2
(mdadm/grow: adding a test to ensure resize was required)

s->size > 1 : s->size is '1' when '--grow --size max'
parameter is specified, so correct this test here.

Signed-off-by: Zhilong Liu <zlliu@suse.com>
---

resend it due to the missed patch:
[PATCH v3] mdadm/grow: adding a test to ensure resize was required

 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-28 16:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-23  3:10 [PATCH] mdadm/grow: correct the s->size > 1 to make 'max' work Zhilong Liu
2017-11-28 16:07 ` Jes Sorensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).