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

From: Pavel Begunkov

Date: Thu Dec 03 2026 - 10:07:44 EST


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.

--
Pavel Begunkov