mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-08 14:13:53 +00:00
md: don't clear MD_RECOVERY_FROZEN for new dm-raid until resume
After commit9dbd1aa3a8
("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 commit1baae052cc
("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:1baae052cc
("md: Don't ignore suspended array in md_check_recovery()") Fixes:9dbd1aa3a8
("dm raid: add reshaping support to the target") Cc: stable@vger.kernel.org # v6.7+ Signed-off-by: Yu Kuai <yukuai3@huawei.com> Signed-off-by: Xiao Ni <xni@redhat.com> Acked-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Song Liu <song@kernel.org> Link: https://lore.kernel.org/r/20240305072306.2562024-2-yukuai1@huaweicloud.com
This commit is contained in:
parent
268283244c
commit
2f03d0c2cd
@ -6062,7 +6062,10 @@ int md_run(struct mddev *mddev)
|
||||
pr_warn("True protection against single-disk failure might be compromised.\n");
|
||||
}
|
||||
|
||||
mddev->recovery = 0;
|
||||
/* dm-raid expect sync_thread to be frozen until resume */
|
||||
if (mddev->gendisk)
|
||||
mddev->recovery = 0;
|
||||
|
||||
/* may be over-ridden by personality */
|
||||
mddev->resync_max_sectors = mddev->dev_sectors;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user