summaryrefslogtreecommitdiff
path: root/.mailmap
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2022-09-09 12:11:49 +0100
committerJens Axboe <axboe@kernel.dk>2022-09-09 08:57:57 -0600
commit4d9cb92ca41dd8e905a4569ceba4716c2f39c75a (patch)
tree3dca38b9e851554c5d33366e191570c4b1c2de17 /.mailmap
parent3c8400532dd8305024ff6eea38707de20b1b9822 (diff)
io_uring/rw: fix short rw error handlingio_uring-6.0-2022-09-09
We have a couple of problems, first reports of unexpected link breakage for reads when cqe->res indicates that the IO was done in full. The reason here is partial IO with retries. TL;DR; we compare the result in __io_complete_rw_common() against req->cqe.res, but req->cqe.res doesn't store the full length but rather the length left to be done. So, when we pass the full corrected result via kiocb_done() -> __io_complete_rw_common(), it fails. The second problem is that we don't try to correct res in io_complete_rw(), which, for instance, might be a problem for O_DIRECT but when a prefix of data was cached in the page cache. We also definitely don't want to pass a corrected result into io_rw_done(). The fix here is to leave __io_complete_rw_common() alone, always pass not corrected result into it and fix it up as the last step just before actually finishing the I/O. Cc: stable@vger.kernel.org Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://github.com/axboe/liburing/issues/643 Reported-by: Beld Zhang <beldzhang@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to '.mailmap')
0 files changed, 0 insertions, 0 deletions