dm raid: fix discard support regression
PATCH 1/1 dm raid: fix discard support regression
With upstream commit ecbfb9f118bc raid level takeover support got added.
In dm core, restrictions including discard properties are applied when swapping in a new table. Any discard settings provided in the context of pre_resume, which gets called afterwards are lost.
Solve by moving configure_discard_support() back into the constructor.
Signed-off-by Heinz Mauelshagen <[email protected]>
--- drivers/md/dm-raid.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/md/dm-raid.c +3 -6
@@ -2999,6 +2999,9 @@ static int raid_ctr(struct dm_target *ti, unsigned int argc, char **argv) } } +/* Disable/enable discard support on raid set. */ +configure_discard_support (rs); +mddev_unlock (&rs->md);return 0 ;
@@ -3585,12 +3588,6 @@ static int raid_preresume(struct dm_target *ti)if (test_bit (RT_FLAG_UPDATE_SBS , &rs->runtime_flags))rs_update_sbs (rs); -/* -* Disable/enable discard support on raid set after any -* conversion, because devices can have been added -*/ -configure_discard_support (rs); -/* Load the bitmap from disk unless raid0 */ r =__load_dirty_region_bitmap (rs);if (r)
Signature · 1 line
2.7.4