https://github.com/torvalds/linux
Revision eacc6dfaea963ef61540abb31ad7829be5eff284 authored by Jens Axboe on 07 January 2020, 20:08:56 UTC, committed by Jens Axboe on 07 January 2020, 20:08:56 UTC
We currently punt any short read on a regular file to async context,
but this fails if the short read is due to running into EOF. This is
especially problematic since we only do the single prep for commands
now, as we don't reset kiocb->ki_pos. This can result in a 4k read on
a 1k file returning zero, as we detect the short read and then retry
from async context. At the time of retry, the position is now 1k, and
we end up reading nothing, and hence return 0.

Instead of trying to patch around the fact that short reads can be
legitimate and won't succeed in case of retry, remove the logic to punt
a short read to async context. Simply return it.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent fd1c4bc
History
Tip revision: eacc6dfaea963ef61540abb31ad7829be5eff284 authored by Jens Axboe on 07 January 2020, 20:08:56 UTC
io_uring: remove punt of short reads to async context
Tip revision: eacc6df
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 15.0 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 71 bytes
.gitattributes -rw-r--r-- 62 bytes
.gitignore -rw-r--r-- 1.7 KB
.mailmap -rw-r--r-- 13.8 KB
COPYING -rw-r--r-- 423 bytes
CREDITS -rw-r--r-- 97.3 KB
Kbuild -rw-r--r-- 1.3 KB
Kconfig -rw-r--r-- 595 bytes
MAINTAINERS -rw-r--r-- 526.2 KB
Makefile -rw-r--r-- 59.4 KB
README -rw-r--r-- 727 bytes

README

back to top