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>
Tue, 7 Jan 2025 18:11:36 +0000 (11:11 -0700)
commit24b91ec87ac6a32058f79ead8f925b31aaad6210
tree4a5a45c396af5a6928e7772cb7bf7134822b396a
parent5e0a894cf7f3664013661a9c463e36d21c78f24d
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