[PATCH 2/4] FIX: Fiddle raid_disks number for external metadta

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

 



For external metadata migration is started already.
For native metadata migration starts when md is pushed to reshape state.
Change raid disks to currently present in md to calculate required
configuration change in analyse_change() and add required disks to md.

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

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

diff --git a/Grow.c b/Grow.c
index 017a79d..4c221ad 100644
--- a/Grow.c
+++ b/Grow.c
@@ -1676,6 +1676,8 @@ static int reshape_array(char *container, int fd, char *devname,
 	if (info->reshape_active) {
 		int new_level = info->new_level;
 		info->new_level = UnSet;
+		if (container)
+			info->array.raid_disks -= info->delta_disks;
 		msg = analyse_change(info, &reshape);
 		info->new_level = new_level;
 		if (!restart)

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