io_uring: move reissue into regular IO path
authorJens Axboe <axboe@kernel.dk>
Fri, 2 Apr 2021 02:41:15 +0000 (20:41 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 2 Apr 2021 15:24:20 +0000 (09:24 -0600)
commit230d50d448acb6639991440913299e50cacf1daf
tree80c9957edc04cc1203dd3741c26193417dcd697e
parent07204f21577a1d882f0259590c3553fe6a476381
io_uring: move reissue into regular IO path

It's non-obvious how retry is done for block backed files, when it happens
off the kiocb done path. It also makes it tricky to deal with the iov_iter
handling.

Just mark the req as needing a reissue, and handling it from the
submission path instead. This makes it directly obvious that we're not
re-importing the iovec from userspace past the submit point, and it means
that we can just reuse our usual -EAGAIN retry path from the read/write
handling.

At some point in the future, we'll gain the ability to always reliably
return -EAGAIN through the stack. A previous attempt on the block side
didn't pan out and got reverted, hence the need to check for this
information out-of-band right now.

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