[PATCH v2 2/2] md/raid10: Preserve recovery flags on reshape abort

From: nenkov2004

Date: Fri Nov 20 2026 - 06:18:53 EST


From: Hristos Nenkov <nenkov2004@xxxxxxxxx>

raid10_start_reshape() can fail before it updates the recovery flags.
Its abort path clears the entire recovery word, including the
MD_RECOVERY_FROZEN bit that dm-raid requires until raid_resume().

Keep the recovery word intact when rolling back reshape setup. The
preceding dm-raid change clears MD_RECOVERY_WAIT on failure in the
caller that set it.

Fixes: bb63a7019df9 ("md/raid10: resize bitmap when required during reshape.")
Reported-by: syzbot+8b22a0459202f76b4096@xxxxxxxxxxxxxxxxxxxxxxxxx
Closes: https://syzkaller.appspot.com/bug?extid=8b22a0459202f76b4096
Signed-off-by: Hristos Nenkov <nenkov2004@xxxxxxxxx>
---
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;