Linux RAID subsystem development
 help / color / mirror / Atom feed
* [PATCH] md/raid10: preserve recovery flags on reshape abort
       [not found] <6aec6738.059f5055.2712e4.0005.GAE@google.com>
@ 2026-11-10  5:44 ` Hristos Nenkov
  0 siblings, 0 replies; only message in thread
From: Hristos Nenkov @ 2026-11-10  5:44 UTC (permalink / raw)
  To: Song Liu, linux-raid
  Cc: Yu Kuai, Li Nan, Xiao Ni, NeilBrown, dm-devel, linux-kernel,
	Alasdair Kergon, Mike Snitzer, Mikulas Patocka,
	Benjamin Marzinski, syzbot+8b22a0459202f76b4096, Hristos Nenkov

raid10_start_reshape() can fail while resizing a bitmap before it
changes any recovery bits on its success path. Its abort path nevertheless
clears the entire mddev->recovery bitmap.

dm-raid keeps MD_RECOVERY_FROZEN set across suspend and resume. If RAID10
reshape setup fails, raid_preresume() logs the failure and continues with
resume. Clearing the bitmap removes MD_RECOVERY_FROZEN and makes
raid_resume() hit its invariant warning.

Do not clear mddev->recovery from the RAID10 abort path. The error paths
reach abort before raid10_start_reshape() modifies the recovery bits, so
there is no personality-owned recovery state to roll back there.

Fixes: bb63a7019df9 ("md/raid10: resize bitmap when required during reshape.")
Reported-by: syzbot+8b22a0459202f76b4096@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=8b22a0459202f76b4096
Signed-off-by: Hristos Nenkov <nenkov2004@gmail.com>
---
 drivers/md/raid10.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 066c43154..1fd3f5f4f 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -4490,7 +4490,6 @@ static int raid10_start_reshape(struct mddev *mddev)
 	return 0;
 
 abort:
-	mddev->recovery = 0;
 	spin_lock_irq(&conf->device_lock);
 	conf->geo = conf->prev;
 	mddev->raid_disks = conf->geo.raid_disks;

base-commit: b3dfbde62cf1981c4638939c159dfd087b7a72e9
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-10  5:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <6aec6738.059f5055.2712e4.0005.GAE@google.com>
2026-11-10  5:44 ` [PATCH] md/raid10: preserve recovery flags on reshape abort Hristos Nenkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox