Re: [PATCH v5 0/9] block device fixes for large block sizes, IOCB_NOWAIT, and direct I/O

From: Jens Axboe

Date: Wed Oct 07 2026 - 10:35:32 EST


On 9/23/26 5:56 PM, Tal Zussman wrote:
> A set of independent fixes for the block device file operations. The
> first two were found by Sashiko while reviewing the RWF_DONTCACHE series
> [1]. The fourth and fifth were found by Sashiko's review of v1 of this
> series, and the rest came from asking an LLM to find any similar or
> related issues. Each issue has been reproduced, with the fixes resolving
> the issues.
>
> Patch 1 fixes silently lost mmap writes with CONFIG_BUFFER_HEAD=n.
>
> Patches 2 and 3 take i_rwsem around the direct I/O write fallback and
> the splice read path, which race set_blocksize() changing the mapping's
> minimum folio order.
>
> Patch 4 makes the buffered read path honor IOCB_NOWAIT instead of
> blocking on i_rwsem.
>
> Patch 5 makes IOCB_ATOMIC writes fail instead of tearing, and patch 6
> stops the buffered fallback from retrying an atomic write. Block
> devices can reject both paths into the fallback before submitting any
> I/O, so we fail rather than issue a WARN() like ext4 does. Patch 7
> makes iomap_file_buffered_write() reject IOCB_ATOMIC, so no other
> buffered fallback can complete an atomic write either.
>
> Patch 8 fixes leaked page pins in bio_iov_iter_align_down(), and patch
> 9 removes dead metadata handling in the async direct I/O path.
>
> These issues are currently unlikely to be hit in practice due to the
> specific configurations required to trigger them.
>
> The reproducer for patch 1 is in blktests as block/048, and tests for
> patches 2, 3 and 8 are posted at [2].

This is based against the 7.3 series for some reason, can you please
resend against the 7.4 based branch, for-7.4/block.

--
Jens Axboe