Re: [PATCH] iomap: allocate s_dio_done_wq for async reads as well

Dave Chinner
2025-11-24T21:45:04Z

On Mon, Nov 24, 2025 at 03:00:13PM +0100, Christoph Hellwig wrote:
> Since commit 222f2c7c6d14 ("iomap: always run error completions in user
> context"), read error completions are deferred to s_dio_done_wq. This
> means the workqueue also needs to be allocated for async reads.

The change LGTM, so:

Reviewed-by: Dave Chinner <dchinner@redhat.com>

But I can't help but wonder about putting this in the fast path....

i.e. on the first io_uring/AIO DIO read or write, we will need
allocate this work queue. I think that's getting quite common in
applications and utilities these days, so filesystems are
increasingly likely to need this wq.

Maybe we should make this wq init unconditional and move it to fs
superblock initialisation? That would remove this "only needed once
for init" check that is made on every call through the the IO fast
path....

-Dave.

--
Dave Chinner
david@fromorbit.com