Re: [PATCH v4 3/7] md/raid10: consistently fail atomic writes that require splitting
From: John Garry
Date: Wed Jul 15 2026 - 06:50:04 EST
On 15/07/2026 11:05, Abd-Alrhman Masalkhi wrote:
On Wed, Jul 15, 2026 at 10:25 +0100, John Garry wrote:
On 10/07/2026 11:15, Abd-Alrhman Masalkhi wrote:The other path is when the requested write overlaps a bad-block region
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(),
What is this other badblock path which you are referring to?
from the beginning, but the intended write extends beyond the bad-block
region. In that case, the current code silently reduces max_sectors.
As a result, we end up calling bio_submit_split_bioset(), which
completes the bio with -EINVAL rather than -EIO. This is the same issue
that existed in raid1 and was fixed by patch 2.
OK, it would be nice to add a concise version of that info to the commit log.
Reviewed-by: John Garry <john.g.garry@xxxxxxxxxx>