Skip to content

qcow2: Release read-only bitmaps when inactivated

Max Reitz qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2qcow2: Release read-only bitmaps when inactivatedblock/qcow2-bitmap.c+19 -43 replies
2/2iotests/169: Test source cont with backing bmaptests/qemu-iotests/169 tests/qemu-iotests/169.out+65 -31 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchPeter KrempaEric Blake
1/2T-b R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] qcow2: Release read-only bitmaps when inactivated

Hi,

When beginning migration, the qcow2 driver syncs all persistent bitmaps to disk and then releases them. If the user decides to continue on the source after migration, those bitmaps are re-loaded from the qcow2 image.

However, we only do this for bitmaps that were actively synced, i.e. R/W bitmaps. RO bitmaps (those on backing images) are not written and thus not released. However, we still try to re-load them when continuing, and that will then fail.

To fix this problem, I think we should just consider RO bitmaps to be in sync from the beginning, so we can release them just like bitmaps that we have actively written back to the image. This is done by patch 1.

However, there’s a catch: Peter Krempa noted that it isn’t in libvirt’s interest for the bitmaps to be released before migration at all, because this makes them disappear from query-named-block-node’s dirty-bitmaps list, but libvirt needs the bitmaps to be there:

https://bugzilla.redhat.com/show_bug.cgi?id=1858739#c3

If it’s really not feasible to keep the bitmaps around, then I suppose what might work for libvirt is to query image/format-specific/data/bitmaps in addition to dirty-bitmaps (every bitmap that we released before migration must be a persistent bitmap).

What are your thoughts on this?

Max Reitz (2):
qcow2: Release read-only bitmaps when inactivated iotests/169: Test source cont with backing bmap

 block/qcow2-bitmap.c       | 23 +++++++++++---
 tests/qemu-iotests/169     | 64 +++++++++++++++++++++++++++++++++++++-
 tests/qemu-iotests/169.out |  4 +--
 3 files changed, 84 insertions(+), 7 deletions(-)
Signature · 1 line
2.26.2