Skip to content

qcow2: Undo leaked allocations in co_writev

Max Reitz qemu-devel 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v12 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- patch 1: added a comment about the significance of future changes at a certain point in qcow2_co_writev
- patch 1: changed QCOW2_DISCARD_ALWAYS to QCOW2_DISCARD_OTHER

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2qcow2: Undo leaked allocations in co_writevblock/qcow2.c+15 -00 replies
2/2qemu-iotests: Extend test 026tests/qemu-iotests/026 tests/qemu-iotests/026.out tests/qemu-iotests/026.out.nocache+47 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 0/2] qcow2: Undo leaked allocations in co_writev

If a write request on a qcow2 image spans more than one L2 table, qcow2_alloc_cluster_offset cannot allocate the required clusters in a single operation. This results in leaks, if a subsequent (atomic) allocation in that function fails, because qcow2_co_writev does not undo unused cluster allocations.

This series implements that deallocation and provides a test for it.

v2:
- patch 1: added a comment about the significance of future changes at a certain point in qcow2_co_writev
- patch 1: changed QCOW2_DISCARD_ALWAYS to QCOW2_DISCARD_OTHER

Max Reitz (2):
qcow2: Undo leaked allocations in co_writev
qemu-iotests: Extend test 026

 block/qcow2.c                      | 15 +++++++++++++++
 tests/qemu-iotests/026             | 31 +++++++++++++++++++++++++++++++
 tests/qemu-iotests/026.out         |  8 ++++++++
 tests/qemu-iotests/026.out.nocache |  8 ++++++++
 4 files changed, 62 insertions(+)
Signature · 1 line
1.8.3.1