Skip to content

Correct bitmap size in zero cluster expansion

Max Reitz qemu-devel 1 version Applied

Status from this message: Thanks, applied to the block branch.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2qcow2: Correct bitmap size in zero expansionblock/qcow2-cluster.c+27 -110 replies
2/2qemu-iotests: Preallocated zero clusters in 061tests/qemu-iotests/061 tests/qemu-iotests/061.out+20 -00 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/2] Correct bitmap size in zero cluster expansion

The current version of the zero cluster expansion uses the guest disk size for determining the size of the expanded_clusters bitmap, however, it is addressed using host offsets. This leads to an assertion failing if the host image size exceeds the guest disk size. This is fixed by using the host image size instead for allocating the bitmap.

This however uncovers another problem: If the host image is growable, it may grow during the zero cluster expansion due to cluster allocations. If this happens, the bitmap has to be resized accordingly.

Max Reitz (2):
qcow2: Correct bitmap size in zero expansion
qemu-iotests: Preallocated zero clusters in 061

 block/qcow2-cluster.c      | 38 +++++++++++++++++++++++++++-----------
 tests/qemu-iotests/061     |  9 +++++++++
 tests/qemu-iotests/061.out | 11 +++++++++++
 3 files changed, 47 insertions(+), 11 deletions(-)
Signature · 1 line
1.8.3.1