io_uring: punt short reads to async context
authorJens Axboe <axboe@kernel.dk>
Wed, 15 May 2019 19:53:07 +0000 (13:53 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 31 May 2019 21:30:03 +0000 (15:30 -0600)
commit9d93a3f5a0c0d0f79aebc597d47c7cedc852aeb5
treede9be151f1bd21d306e7c779a27d9d99c111ac70
parent87e5e6dab6c2a21fab2620f37786276d202e2ce0
io_uring: punt short reads to async context

We can encounter a short read when we're doing buffered reads and the
data is partially cached. Right now we just return the short read, but
that forces the application to read that CQE, then issue another SQE
to finish the read. That read will not be cached, and hence will result
in an async punt.

It's more efficient to do that async punt from within the kernel, as
that will the not need two round trips more to the kernel.

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