Re: [PATCH 2/2] io_uring/rw: honour RWF_NOWAIT when a dma-buf map is missing

From: Diangang Li

Date: Thu Dec 03 2026 - 21:35:44 EST


On 2026/12/3 23:07, Pavel Begunkov wrote:
> On 11/30/26 07:28, Diangang Li wrote:
>> From: Diangang Li <lidiangang@xxxxxxxxxxxxx>
>>
>> On nonblocking issue, io_attach_dmabuf_map() returns -EAGAIN if no map is
>> available. This happens before io_rw_init_file() sets REQ_F_NOWAIT, so
>> an RWF_NOWAIT request is punted to io-wq and can block instead of
>> completing with -EAGAIN.
>>
>> Set REQ_F_NOWAIT on this path to prevent the retry. Requests issued
>> directly from io-wq can still create the map in blocking mode.
>
> I'm curious, are you using it for something with nowait? Async with
> nowait is a bit of a debatable topic, so I was wondering what's the
> use case.
>

Hi Pavel,

No real use case yet, I just spotted this while reading the code and
writing some tests. We're looking at io_uring dma-buf for GDS-like
workloads, though we'd still need ext4 and nvme-rdma support before
using it for real.

So it was just a consistency fix. Happy to keep it as-is, fold in Anuj's
change for v2, or just drop this patch if you think it's not worth
bothering with.

Thanks,
Diangang