md/raid5: always convert llbitmap bits for discard
authorYu Kuai <yukuai@fygo.io>
Fri, 5 Jun 2026 07:26:39 +0000 (15:26 +0800)
committerYu Kuai <yukuai@fygo.io>
Sat, 20 Jun 2026 19:16:24 +0000 (03:16 +0800)
commit53528031e7a6e16f0f05347f3826ffb4f957b7e4
tree206222d86598b7972916de11587281b7d0af6976
parent90573092673cdbb2f28f0932fd40de65c3f762cf
md/raid5: always convert llbitmap bits for discard

llbitmap discard is useful even when no underlying member device supports
it. The discard still converts the llbitmap range to unwritten, so later
reads and recovery do not rely on stale parity for that range.

Let llbitmap discard bypass the raid5 lower discard support check. If lower
discard is not safe or not supported, complete the accounted clone after
md_account_bio() so the llbitmap conversion callbacks run without member
discard bios.

Link: https://patch.msgid.link/20260605072639.2434847-4-yukuai@kernel.org
Signed-off-by: Yu Kuai <yukuai@fygo.io>
drivers/md/raid5.c