Skip to content

Commit a442328

Browse files
mauelshasnitm
authored andcommitted
dm raid: fix frozen recovery regression
On LVM2 conversions via lvconvert(8), the target keeps mapped devices in frozen state when requesting RAID devices be resynchronized. This applies to e.g. adding legs to a raid1 device or taking over from raid0 to raid4 when the rebuild flag's set on the new raid1 legs or the added dedicated parity stripe. Also, fix frozen recovery for reshaping as well. Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
1 parent 0a83df6 commit a442328

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/md/dm-raid.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ struct raid_dev {
191191
#define RT_FLAG_RS_BITMAP_LOADED 2
192192
#define RT_FLAG_UPDATE_SBS 3
193193
#define RT_FLAG_RESHAPE_RS 4
194-
#define RT_FLAG_KEEP_RS_FROZEN 5
195194

196195
/* Array elements of 64 bit needed for rebuild/failed disk bits */
197196
#define DISKS_ARRAY_ELEMS ((MAX_RAID_DEVICES + (sizeof(uint64_t) * 8 - 1)) / sizeof(uint64_t) / 8)
@@ -2579,7 +2578,6 @@ static int rs_prepare_reshape(struct raid_set *rs)
25792578
} else {
25802579
/* Process raid1 without delta_disks */
25812580
mddev->raid_disks = rs->raid_disks;
2582-
set_bit(RT_FLAG_KEEP_RS_FROZEN, &rs->runtime_flags);
25832581
reshape = false;
25842582
}
25852583
} else {
@@ -2590,7 +2588,6 @@ static int rs_prepare_reshape(struct raid_set *rs)
25902588
if (reshape) {
25912589
set_bit(RT_FLAG_RESHAPE_RS, &rs->runtime_flags);
25922590
set_bit(RT_FLAG_UPDATE_SBS, &rs->runtime_flags);
2593-
set_bit(RT_FLAG_KEEP_RS_FROZEN, &rs->runtime_flags);
25942591
} else if (mddev->raid_disks < rs->raid_disks)
25952592
/* Create new superblocks and bitmaps, if any new disks */
25962593
set_bit(RT_FLAG_UPDATE_SBS, &rs->runtime_flags);
@@ -2902,7 +2899,6 @@ static int raid_ctr(struct dm_target *ti, unsigned int argc, char **argv)
29022899
goto bad;
29032900

29042901
set_bit(RT_FLAG_UPDATE_SBS, &rs->runtime_flags);
2905-
set_bit(RT_FLAG_KEEP_RS_FROZEN, &rs->runtime_flags);
29062902
/* Takeover ain't recovery, so disable recovery */
29072903
rs_setup_recovery(rs, MaxSector);
29082904
rs_set_new(rs);
@@ -3624,8 +3620,7 @@ static void raid_resume(struct dm_target *ti)
36243620
* retrieved from the superblock by the ctr because
36253621
* the ongoing recovery/reshape will change it after read.
36263622
*/
3627-
if (!test_bit(RT_FLAG_KEEP_RS_FROZEN, &rs->runtime_flags))
3628-
clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery);
3623+
clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery);
36293624

36303625
if (mddev->suspended)
36313626
mddev_resume(mddev);

0 commit comments

Comments
 (0)