[PATCH 1/3] mdadm/Grow: fix the broken raid level conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To fix the commit: 4b74a905a67e
(mdadm/grow: Component size must be larger than chunk size)
Since cannot change component size at the same time as other
changes, ensure the 'level' is UnSet when changing component
size, and also not affect the raid level conversion.

Signed-off-by: Zhilong Liu <zlliu@xxxxxxxx>
---
 Grow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Grow.c b/Grow.c
index 1149753..180fd78 100644
--- a/Grow.c
+++ b/Grow.c
@@ -1814,7 +1814,8 @@ int Grow_reshape(char *devname, int fd,
 	}
 
 	if (array.level > 1 &&
-	   (array.chunk_size / 1024) > (int)s->size) {
+	   (array.chunk_size / 1024) > (int)s->size &&
+	    s->level == UnSet) {
 		pr_err("component size must be larger than chunk size.\n");
 		return 1;
 	}
-- 
2.6.6

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux