]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: monitor: Extract vmstate presence for internal snapshots in qemuBlockGetNamedNo...
authorPeter Krempa <pkrempa@redhat.com>
Wed, 13 Nov 2024 08:44:03 +0000 (09:44 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 18 Nov 2024 12:51:13 +0000 (13:51 +0100)
commit2da32ff468ac7936f190ed86fe3a7188a1972782
treea27aafc7d323cbe68be6042e217a088ebfa088a6
parent6902e77c01baa1b8ee6879f9e1ef2473ec5f1c94
qemu: monitor: Extract vmstate presence for internal snapshots in qemuBlockGetNamedNodeData

Refactor the parts of qemuBlockGetNamedNodeData which fetch the names of
internal snapshots present in the on-disk state of QCOW2 images to also
extract the presence of the 'vmstate' section.

This requires conversion of the snapshot list to a hash table as we
always know the name of the snapshot that we're looking for, and the
hash table allows also storing of additional data which we'll use to
store the presence of the 'vmstate'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor_json.c
src/qemu/qemu_snapshot.c
tests/qemublocktest.c
tests/qemublocktestdata/bitmap/snapshots-internal.out