Re: [PATCH v3 2/7] md/raid1: advertise atomic write limits and handle runtime constraints
John Garry <[email protected]>
| Newsgroups | gmane.linux.raid,gmane.linux.kernel |
|---|---|
| Organization | Oracle Corporation |
| Message-ID | <[email protected]> |
On 08/07/2026 11:13, Abd-Alrhman Masalkhi wrote:
> Atomic writes in RAID1 must fit within a single barrier unit. Set
> chunk_sectors to BARRIER_UNIT_SECTOR_SIZE so that bios which would cross
> a barrier-unit boundary are rejected by the block layer before reaching
> MD.
More accurate would be to say that we restrict the atomic write limits
so that we never produce a write which straddles BARRIER_UNIT_SECTOR_SIZE.
>
> 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")
> Signed-off-by: Abd-Alrhman Masalkhi <[email protected]>
Reviewed-by: John Garry <[email protected]>