[PATCH 4/4] FIX: Add raid5 to raid0 case to analyse_change()

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

 



Transition raid5 to raid0 was not covered in analyse_change()
Missing code added.

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

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

diff --git a/Grow.c b/Grow.c
index 08fc258..b04faf1 100644
--- a/Grow.c
+++ b/Grow.c
@@ -1056,6 +1056,14 @@ char *analyse_change(struct mdinfo *info, struct reshape *re)
 		info->array.layout = ALGORITHM_PARITY_N;
 	case 5:
 		switch (info->new_level) {
+		case 0:
+			re->level = 5;
+			info->delta_disks = 0;
+			re->before.data_disks = info->array.raid_disks - 1;
+			re->before.layout = info->array.layout;
+			re->after.data_disks = info->array.raid_disks;
+			re->after.layout = 0;
+			break;
 		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