Re: [PATCH] dm: fail a REQ_PREFLUSH bio with data when its preflush fails

From: Tejun Heo

Date: Fri Nov 13 2026 - 15:00:34 EST


On Thu, Nov 12, 2026 at 10:35:29AM +0900, Daejun Park wrote:
> For a bio with REQ_PREFLUSH and data, dm core may send an empty flush
> first. If the flush fails, __dm_io_complete() still reissues the bio
> without REQ_PREFLUSH and drops the error. When that write succeeds,
> the XFS log keeps running and fsync() can return 0.
>
> End the bio with the flush error instead of writing the data, as
> blk-mq does.
>
> Fixes: 6a8736d10cb4 ("dm: relax ordering of bio-based flush implementation")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Daejun Park <daejun7.park@xxxxxxxxxxx>

Acked-by: Tejun Heo <tj@xxxxxxxxxx>

Thanks.

--
tejun