[PATCH 1/2] md: raid5 return new layout in mdstat while reshaping

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

 



From: Maciej Trela <maciej.trela@xxxxxxxxx>

While reshaping, report mdstat algorithm according to the new_layout.

Signed-off-by: Maciej Trela <maciej.trela@xxxxxxxxx>
---
 drivers/md/raid5.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 4d85632..b7c6561 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -5256,8 +5256,12 @@ static void status(struct seq_file *seq, mddev_t *mddev)
 	raid5_conf_t *conf = mddev->private;
 	int i;
 
-	seq_printf(seq, " level %d, %dk chunk, algorithm %d", mddev->level,
-		mddev->chunk_sectors / 2, mddev->layout);
+	seq_printf(seq, " level %d, %dk chunk,", mddev->level,
+		mddev->chunk_sectors / 2);
+	if (mddev->reshape_position != MaxSector)
+		seq_printf(seq, " algorithm %d", mddev->new_layout);
+	else
+		seq_printf(seq, " algorithm %d", mddev->layout);
 	seq_printf (seq, " [%d/%d] [", conf->raid_disks, conf->raid_disks - mddev->degraded);
 	for (i = 0; i < conf->raid_disks; i++)
 		seq_printf (seq, "%s",
--
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