Patch "dm raid: fix activation of existing raid4/10 devices" has been added to the 4.8-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
dm raid: fix activation of existing raid4/10 devices
to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
dm-raid-fix-activation-of-existing-raid4-10-devices.patch
and it can be found in the queue-4.8 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
b052b07c39d593c9954a84d5bbe1563999483f38Mon Sep 17 00:00:00 2001
From: Heinz Mauelshagen <[email protected]>
Date: Mon, 17 Oct 2016 21:20:07 +0200
Subject: dm raid: fix activation of existing raid4/10 devices
From: Heinz Mauelshagen <[email protected]>
commit b052b07c39d593c9954a84d5bbe1563999483f38 upstream.
dm-raid 1.9.0 fails to activate existing RAID4/10 devices that have the old superblock format (which does not have takeover/reshaping support that was added via commit 33e53f06850f).
Fix validation path for old superblocks by reverting to the old raid4 layout and basing checks on mddev->new_{level,layout,...} members in super_init_validation().
--- Documentation/device-mapper/dm-raid.txt | 1 + drivers/md/dm-raid.c | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-)
Documentation/device-mapper/dm-raid.txt +1 -0
@@ -309,3 +309,4 @@ Version History with a reshape in progress. 1.9.0 Add support for RAID level takeover/reshape/region size and set size reduction. +1.9.1 Fix activation of existing RAID 4/10 mapped devices
drivers/md/dm-raid.c +7 -5
@@ -266,7 +266,7 @@ static struct raid_type { {"raid10_offset", "raid10 offset (striped mirrors)", 0, 2, 10, ALGORITHM_RAID10_OFFSET}, {"raid10_near", "raid10 near (striped mirrors)", 0, 2, 10, ALGORITHM_RAID10_NEAR}, {"raid10", "raid10 (striped mirrors)", 0, 2, 10, ALGORITHM_RAID10_DEFAULT}, - {"raid4", "raid4 (dedicated last parity disk)", 1, 2, 4, ALGORITHM_PARITY_N}, /* raid4 layout = raid5_n */ + {"raid4", "raid4 (dedicated first parity disk)", 1, 2, 5, ALGORITHM_PARITY_0}, /* raid4 layout = raid5_0 */ {"raid5_n", "raid5 (dedicated last parity disk)", 1, 2, 5, ALGORITHM_PARITY_N}, {"raid5_ls", "raid5 (left symmetric)", 1, 2, 5, ALGORITHM_LEFT_SYMMETRIC}, {"raid5_rs", "raid5 (right symmetric)", 1, 2, 5, ALGORITHM_RIGHT_SYMMETRIC},
@@ -2087,11 +2087,11 @@ static int super_init_validation(struct/* * No takeover/reshaping, because we don't have the extended v1.9.0 metadata */ -if (le32_to_cpu (sb->level) != mddev->level) { +if (le32_to_cpu (sb->level) != mddev->new_level) {DMERR ("Reshaping/takeover raid sets not yet supported. (raid level/stripes/size change)" );return -EINVAL ; } -if (le32_to_cpu (sb->layout) != mddev->layout) { +if (le32_to_cpu (sb->layout) != mddev->new_layout) {DMERR ("Reshaping raid sets not yet supported. (raid layout change)" );DMERR (" 0x%X vs 0x%X" ,le32_to_cpu (sb->layout), mddev->layout); DMERR(" Old layout: %s w/ %d copies",
@@ -2102,7 +2102,7 @@ static int super_init_validation(struct raid10_md_layout_to_copies(mddev->layout));return -EINVAL ; } -if (le32_to_cpu (sb->stripe_sectors) != mddev->chunk_sectors) { +if (le32_to_cpu (sb->stripe_sectors) != mddev->new_chunk_sectors) {DMERR ("Reshaping raid sets not yet supported. (stripe sectors change)" );return -EINVAL ; }
@@ -2115,6 +2115,8 @@ static int super_init_validation(structreturn -EINVAL ; } +DMINFO ("Discovered old metadata format; upgrading to extended metadata format" ); +/* Table line is checked vs. authoritative superblock */ rs_set_new (rs); }
@@ -3647,7 +3649,7 @@ static void raid_resume(struct dm_targetstatic struct target_type raid_target = { .name ="raid" , - .version = {1 ,9 ,0 }, + .version = {1 ,9 ,1 }, .module =THIS_MODULE , .ctr = raid_ctr, .dtr = raid_dtr,
Patches currently in stable-queue which might be from [email protected] are
queue-4.8/dm-mirror-fix-read-error-on-recovery-after-default-leg-failure.patch queue-4.8/dm-raid-fix-activation-of-existing-raid4-10-devices.patch queue-4.8/dm-raid-fix-compat_features-validation.patch