[PATCH 1/5] FIX: set delta_disks to 0 for raid5->raid0 transition

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

 



We have to set proper value of delta_disks to avoid it wrongly being set
when it value remains UnSet for this level transition (Grow.c:1224).

This causes too small value set to "raid_disks" in sysfs
and reshape raid5->raid0 fails.

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

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

diff --git a/Grow.c b/Grow.c
index 424d489..dba2825 100644
--- a/Grow.c
+++ b/Grow.c
@@ -1073,6 +1073,7 @@ char *analyse_change(struct mdinfo *info, struct reshape *re)
 		switch (info->new_level) {
 		case 0:
 			delta_parity = -1;
+			info->delta_disks = 0;
 		case 4:
 			re->level = info->array.level;
 			re->before.data_disks = info->array.raid_disks - 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