Skip to content

Commit 2f03d0c

Browse files
YuKuai-huaweiliu-song-6
authored andcommitted
md: don't clear MD_RECOVERY_FROZEN for new dm-raid until resume
After commit 9dbd1aa ("dm raid: add reshaping support to the target") raid_ctr() will set MD_RECOVERY_FROZEN before md_run() and expect to keep array frozen until resume. However, md_run() will clear the flag by setting mddev->recovery to 0. Before commit 1baae05 ("md: Don't ignore suspended array in md_check_recovery()"), dm-raid actually relied on suspending to prevent starting new sync_thread. Fix this problem by keeping 'MD_RECOVERY_FROZEN' for dm-raid in md_run(). Fixes: 1baae05 ("md: Don't ignore suspended array in md_check_recovery()") Fixes: 9dbd1aa ("dm raid: add reshaping support to the target") Cc: [email protected] # v6.7+ Signed-off-by: Yu Kuai <[email protected]> Signed-off-by: Xiao Ni <[email protected]> Acked-by: Mike Snitzer <[email protected]> Signed-off-by: Song Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 2682832 commit 2f03d0c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/md/md.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6062,7 +6062,10 @@ int md_run(struct mddev *mddev)
60626062
pr_warn("True protection against single-disk failure might be compromised.\n");
60636063
}
60646064

6065-
mddev->recovery = 0;
6065+
/* dm-raid expect sync_thread to be frozen until resume */
6066+
if (mddev->gendisk)
6067+
mddev->recovery = 0;
6068+
60666069
/* may be over-ridden by personality */
60676070
mddev->resync_max_sectors = mddev->dev_sectors;
60686071

0 commit comments

Comments
 (0)