]> xenbits.xensource.com Git - libvirt.git/commit
qemu: snapshot: Densely pack data in qemuDomainSnapshotDiskDataCollect
authorPeter Krempa <pkrempa@redhat.com>
Wed, 5 Jun 2019 12:24:25 +0000 (14:24 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 10 Jun 2019 12:01:08 +0000 (14:01 +0200)
commitf34397e51c17f34d1dea37931a0e31647302a57f
tree399b624b0c34d6adfceb27ea80d4d3099b994f80
parent96785030881e615512781768d26c97d59026f685
qemu: snapshot: Densely pack data in qemuDomainSnapshotDiskDataCollect

The function skips disks which are not selected for snapshot. Rather
than creating a sparse array and check whether the given field is filled
compress the entries.

Note that this does not allocate a smaller array, but the memory
allocation is short-lived.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_driver.c