OSDN Git Service

io_uring: use iov_iter state save/restore helpers
authorJens Axboe <axboe@kernel.dk>
Fri, 10 Sep 2021 17:19:14 +0000 (11:19 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 15 Sep 2021 15:22:32 +0000 (09:22 -0600)
commitcd65869512ab5668a5d16f789bc4da1319c435c4
tree42bf48b536fadee33965cbaa76aeea2a8cb953e7
parent8fb0f47a9d7acf620d0fd97831b69da9bc5e22ed
io_uring: use iov_iter state save/restore helpers

Get rid of the need to do re-expand and revert on an iterator when we
encounter a short IO, or failure that warrants a retry. Use the new
state save/restore helpers instead.

We keep the iov_iter_state persistent across retries, if we need to
restart the read or write operation. If there's a pending retry, the
operation will always exit with the state correctly saved.

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