block: Split padded I/O vectors exceeding IOV_MAX
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest4 patches 1 replyIn review
- v14 patches 16 repliesSuperseded
Changes in v2 from the cover letter
- Patch 1: Made a note in the commit message of having renamed
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | util/iov: Make qiov_slice() publicinclude/ util/ | +10 | 0 replies | |
| 2/4 | block: Collapse padded I/O vecs exceeding IOV_MAXblock/ | +151 | 1 reply | |
| 3/4 | util/iov: Remove qemu_iovec_init_extended()include/ util/ | +11 | 0 replies | |
| 4/4 | iotests/iov-padding: New testtests/ tests/ | +144 | 0 replies |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Eric Blake | Vladimir Sementsov-Ogievskiy |
|---|---|---|
| 1/4 | R-b | R-b |
| 2/4 | R-b | |
| 3/4 | R-b | R-b |
| 4/4 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/4] block: Split padded I/O vectors exceeding IOV_MAX
RFC:
https://lists.nongnu.org/archive/html/qemu-block/2023-03/msg00446.html
v1:
https://lists.nongnu.org/archive/html/qemu-devel/2023-03/msg05049.html
As explained in the RFC’s cover letter, the problem this series addresses is that we pad requests from the guest that are unaligned to the underlying storage’s alignment requirements so they fit. This involves giving them head and/or tail padding.
We generally work with I/O vectors, so this padding is added via prepending/appending vector elements. We have a maximum limit on the number of elements, though (1024, specifically), so it is possible that padding has the vector exceed this limit, resulting in an unrecoverable I/O error that is returned to the guest -- on a perfectly valid request, as far as the guest is concerned.
To fix this, when the limit would be exceeded, this series temporarily merges some (up to three) I/O vector element into one to decrease the number of vector elements as far as necessary.
v2:
- Patch 1: Made a note in the commit message of having renamed
qiov_slice() -> qemu_iovec_slice()
- Patch 2:
- Renamed bdrv_padding_destroy() to bdrv_padding_finalize(), indicating that the padding is not just simply destroyed, but more steps may be taken (i.e. copying back the contents of the temporary buffer used for the merged elements)
- Generally replaced “couple of” by “two or three”
Hanna Czenczek (4):
util/iov: Make qiov_slice() public
block: Collapse padded I/O vecs exceeding IOV_MAX util/iov: Remove qemu_iovec_init_extended() iotests/iov-padding: New test
include/qemu/iov.h | 8 +- block/io.c | 166 +++++++++++++++++++++-- util/iov.c | 89 +++--------- tests/qemu-iotests/tests/iov-padding | 85 ++++++++++++ tests/qemu-iotests/tests/iov-padding.out | 59 ++++++++ 5 files changed, 314 insertions(+), 93 deletions(-) create mode 100755 tests/qemu-iotests/tests/iov-padding create mode 100644 tests/qemu-iotests/tests/iov-padding.out
Signature · 1 line
2.39.1