Hi,
v1 is here:
https://lists.nongnu.org/archive/html/qemu-block/2026-03/msg00307.html
Short reads and writes can happen. One way to reproduce them is via
FUSE export, if you force it to limit the request length in the
read/write path (patch in the commit messages of patches 2 and 3), but
specifically short writes apparently can also happen with NFS.
For the file-posix block driver, aio=threads already takes care of them.
aio=native does not, at all, and aio=io_uring only handles short reads,
but not writes. This series has both aio=native and aio=io_uring handle
both short reads and writes. zone-append is not touched, as I don’t
believe resubmitting the tail (if a short append can even happen) is
safe.
v2:
- Patch 1 (kept R-b):
- Put all 32-bit fields together
- Removed unnecessary parentheses
- Patch 2 (kept R-b):
- make qemu_iovec_destroy() call contingent on qiov.iov being non-NULL
- include total_done in offset in laio_do_submit()
- Patch 3 (kept R-b):
- make qemu_iovec_destroy() call contingent on qiov.iov being non-NULL
- include total_done in offset in luring_prep_sqe()
git-backport-diff against v1:
Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively
001/3:[0007] [FC] 'linux-aio: Put all parameters into qemu_laiocb'
002/3:[0017] [FC] 'linux-aio: Resubmit tails of short reads/writes'
003/3:[0023] [FC] 'io-uring: Resubmit tails of short writes'
Hanna Czenczek (3):
linux-aio: Put all parameters into qemu_laiocb
linux-aio: Resubmit tails of short reads/writes
io-uring: Resubmit tails of short writes
block/io_uring.c | 82 +++++++++++++++++++++++-------------------
block/linux-aio.c | 88 +++++++++++++++++++++++++++++++++++++---------
block/trace-events | 2 +-
3 files changed, 117 insertions(+), 55 deletions(-)
--
2.53.0