Re: [PATCH v4 2/7] md/raid1: restrict atomic write limits and handle runtime constraints

"yu kuai" <[email protected]>
Newsgroups gmane.linux.raid,gmane.linux.kernel
Message-ID <[email protected]>
在 2026/7/10 18:15, Abd-Alrhman Masalkhi 写道:

> Restrict the RAID1 atomic write limits by setting chunk_sectors to
> BARRIER_UNIT_SECTOR_SIZE so that atomic writes never straddle a barrier
> unit.
>
> A bio that passes block-layer validation may still become unserviceable
> within RAID1 due to bad blocks or write-behind constraints. In the former
> case, complete the bio with EIO. In the latter case, disable
> write-behind rather than failing the bio with EIO.
>
> Fixes: f2a38abf5f1c ("md/raid1: Atomic write support")
> Fixes: a4c55c902670 ("md/raid1: simplify raid1_write_request() error handling")
> Reviewed-by: John Garry<[email protected]>
> Signed-off-by: Abd-Alrhman Masalkhi<[email protected]>
> ---
> Changes in v4:
>   - Improve the commit message.
>   - Add Reviewed-by tag from John Garry.
>   - Link to v3:https://lore.kernel.org/linux-raid/[email protected]/
>
> Changes in v3:
>   - Set chunk_sectors to BARRIER_UNIT_SECTOR_SIZE instead of setting
>     atomic_write_hw_unit_max.
>   - Avoid enabling write-behind when the atomic write exceeds the
>     write-behind limit.
>   - Link to v2:https://lore.kernel.org/linux-raid/[email protected]/
>
> Changes in v2:
>   - Drop the early atomic write split check from raid1_write_request().
>   - Advertise the atomic write size limit via queue limits.
>   - Disable write-behind instead of failing atomic writes when the
>     BIO_MAX_VECS limit is encountered.
>   - Link to v1:https://lore.kernel.org/linux-raid/[email protected]/
> ---
>   drivers/md/raid1.c | 25 ++++++++++---------------
>   1 file changed, 10 insertions(+), 15 deletions(-)
Reviewed-by: Yu Kuai <[email protected]>

-- 
Thanks,
Kuai
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.