Re: [PATCH RFC 03/41] target: fileio: check that the backing file supports ->{read,write}_iter
From: Christoph Hellwig
Date: Wed Nov 11 2026 - 10:00:03 EST
On Tue, Nov 10, 2026 at 10:14:19AM +0100, Christian Brauner wrote:
> With fd_async_io=1 the fileio backend calls ->read_iter() and
> ->write_iter() of the backing file directly. The synchronous path goes
> through vfs_iter_read() and vfs_iter_write() which check for them but
> the aio path doesn't. So a backing file without them calls a NULL
> pointer on its first I/O.
>
> Refuse such files when configuring the device. On the synchronous path
> every read or write that needed the missing method failed with EINVAL
> anyway.
Looks good:
Reviewed-by: Christoph Hellwig <hch@xxxxxx>