diff options
author | 2020-08-13 11:51:40 -0600 | |
---|---|---|
committer | 2020-08-13 16:00:31 -0700 | |
commit | 227c0c9673d86732995474d277f84e08ee763e46 (patch) | |
tree | 9992d6439bed79798c41ae49fc8566dfe58c43a5 /net/switchdev/switchdev.c | |
parent | io_uring: retain iov_iter state over io_read/io_write calls (diff) | |
download | wireguard-linux-227c0c9673d86732995474d277f84e08ee763e46.tar.xz wireguard-linux-227c0c9673d86732995474d277f84e08ee763e46.zip |
io_uring: internally retry short reads
We've had a few application cases of not handling short reads properly,
and it is understandable as short reads aren't really expected if the
application isn't doing non-blocking IO.
Now that we retain the iov_iter over retries, we can implement internal
retry pretty trivially. This ensures that we don't return a short read,
even for buffered reads on page cache conflicts.
Cleanup the deep nesting and hard to read nature of io_read() as well,
it's much more straight forward now to read and understand. Added a
few comments explaining the logic as well.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions