io_uring/rw: handle -EAGAIN retry at IO completion time
authorJens Axboe <axboe@kernel.dk>
Tue, 7 Jan 2025 17:59:35 +0000 (10:59 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 10 Jan 2025 14:51:43 +0000 (07:51 -0700)
commitd803d123948feffbd992213e144df224097f82b0
tree4a5a45c396af5a6928e7772cb7bf7134822b396a
parent9ac273ae3dc296905b4d61e4c8e7a25592f6d183
io_uring/rw: handle -EAGAIN retry at IO completion time

Rather than try and have io_read/io_write turn REQ_F_REISSUE into
-EAGAIN, catch the REQ_F_REISSUE when the request is otherwise
considered as done. This is saner as we know this isn't happening
during an actual submission, and it removes the need to randomly
check REQ_F_REISSUE after read/write submission.

If REQ_F_REISSUE is set, __io_submit_flush_completions() will skip over
this request in terms of posting a CQE, and the regular request
cleaning will ensure that it gets reissued via io-wq.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c
io_uring/rw.c