dm-raid: only requeue bios when dm is suspending
authorBenjamin Marzinski <bmarzins@redhat.com>
Tue, 28 Apr 2026 23:20:10 +0000 (19:20 -0400)
committerYu Kuai <yukuai@fygo.io>
Sun, 31 May 2026 11:09:17 +0000 (19:09 +0800)
commit1d24d4c1ea1d9d3211c1d178e0c8d95be0348975
tree45f59e55f6bb5411c4bf82f38b5ba8ed956686bc
parente99e15f4e0a0d5049c5604ef1182a61608905d73
dm-raid: only requeue bios when dm is suspending

Returning DM_MAPIO_REQUEUE from the target map() function only requeues
the bio during noflush suspends. During regular operations or during
flushing suspends, it fails the bio. Failing the bio during flushing
suspends is the correct behavior here. The bio cannot be handled, and
dm-raid cannot suspend while it is outstanding. But during normal
operations, dm-raid should not push the bio back to dm. Instead, wait
for the reshape to be resumed.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Reviewed-by: Xiao Ni <xiao@kernel.org>
Link: https://patch.msgid.link/20260428232010.2785514-1-bmarzins@redhat.com
Signed-off-by: Yu Kuai <yukuai@fygo.io>
drivers/md/dm-raid.c
drivers/md/md.h
drivers/md/raid5.c