[PATCH 5/5] FIX: Compute spares_needed basing on metadata info

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

 



When metadata raid_disks information is correct for reshape working level,
this information has to be used for spares_needed calculation.

Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx>
---

 Grow.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Grow.c b/Grow.c
index a05bcef..68962bf 100644
--- a/Grow.c
+++ b/Grow.c
@@ -1661,7 +1661,7 @@ static int reshape_array(char *container, int fd, char *devname,
 	sysfs_freeze_array(info);
 	spares_needed = max(reshape.before.data_disks,
 			    reshape.after.data_disks)
-		+ reshape.parity - array.raid_disks;
+		+ reshape.parity - info->array.raid_disks;
 
 	if (!force &&
 	    info->new_level > 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