Re: [PATCH 1/3] io_uring/rw: don't reissue requests that were issued blocking
From: Anuj gupta
Date: Thu Dec 03 2026 - 07:51:55 EST
> diff --git a/io_uring/rw.c b/io_uring/rw.c
> index 3a8559ff4dc6..7917d1536c47 100644
> --- a/io_uring/rw.c
> +++ b/io_uring/rw.c
> @@ -490,8 +490,10 @@ static bool io_rw_should_reissue(struct io_kiocb *req)
>
> if (!S_ISBLK(mode) && !S_ISREG(mode))
> return false;
> - if ((req->flags & REQ_F_NOWAIT) || (io_wq_current_is_worker() &&
> - !(req->flags & REQ_F_IOPOLL)))
> + if ((req->flags & REQ_F_NOWAIT) ||
> + (!(req->flags & REQ_F_IOPOLL) &&
> + (io_wq_current_is_worker() ||
> + !(rw->kiocb.ki_flags & IOCB_NOWAIT))))
> return false;
With IOCB_NOWAIT indicating whether the attempt was issued in
nonblocking mode, do we still need the io_wq_current_is_worker() check?
With it, a nonblocking attempt completed with -EAGAIN in an io-wq
worker is still not reissued.