[PATCH] Grow: set component size prior to array size

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

 



It is a partial revert of commit 758b327cf5a7 ("Grow: Remove unnecessary
optimization"). For native metadata component size is set in kernel for
entire disk space. As external metadata supports multiple arrays within
one disk, the component size is set to array size. If component size is
not updated prior to array size update, the grow operation fails.

Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@xxxxxxxxx>
---
 Grow.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Grow.c b/Grow.c
index ecf5ca0..4ecb1d8 100644
--- a/Grow.c
+++ b/Grow.c
@@ -1977,6 +1977,8 @@ int Grow_reshape(char *devname, int fd,
 		 */
 		min_csize = 0;
 		for (mdi = sra->devs; mdi; mdi = mdi->next) {
+			sysfs_set_num(sra, mdi, "size", s->size == MAX_SIZE ? 0
+				      : s->size);
 			if (array.not_persistent == 0 &&
 			    array.major_version == 0 &&
 			    get_linux_version() < 3001000) {
-- 
1.8.3.1

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