Re: [PATCH v4 3/7] md/raid10: consistently fail atomic writes that require splitting
From: yu kuai
Date: Wed Jul 15 2026 - 05:11:42 EST
在 2026/7/10 18:15, Abd-Alrhman Masalkhi 写道:
> RAID10 currently handles one badblock path explicitly by failing atomic
> writes with EIO. However, another badblock path can also reduce the
> writable range and force the bio through bio_submit_split_bioset(),
> which implicitly completes the bio with EINVAL.
>
> Fix this by handling atomic writes in the common split check. If RAID10
> determines that an atomic write would require splitting, complete the
> bio with EIO.
>
> Fixes: a1d9b4fd42d9 ("md/raid10: Atomic write support")
> Signed-off-by: Abd-Alrhman Masalkhi<abd.masalkhi@xxxxxxxxx>
> ---
> Changes in v4:
> - No changes.
> - Link to v3:https://lore.kernel.org/linux-raid/20260708101341.473750-4-abd.masalkhi@xxxxxxxxx/
>
> Changes in v3:
> - No changes.
> - Link to v2:https://lore.kernel.org/linux-raid/20260628142420.1051027-4-abd.masalkhi@xxxxxxxxx/
>
> Changes in v2:
> - Drop the early atomic write split check from raid10_write_request()
> and rely on queue limits instead.
> - Link to v1:https://lore.kernel.org/linux-raid/20260623072456.333437-4-abd.masalkhi@xxxxxxxxx/
> ---
> drivers/md/raid10.c | 14 ++++----------
> 1 file changed, 4 insertions(+), 10 deletions(-)
Reviewed-by: Yu Kuai <yukuai@xxxxxxx>
--
Thanks,
Kuai