]> xenbits.xensource.com Git - libvirt.git/commit
qemu: migration: Fix blockdev config with VIR_MIGRATE_PARAM_MIGRATE_DISKS_DETECT_ZEROES
authorPeter Krempa <pkrempa@redhat.com>
Fri, 11 Oct 2024 16:31:28 +0000 (18:31 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 14 Oct 2024 14:25:21 +0000 (16:25 +0200)
commit04d6a0ec5d80c7618e00fcd6456e1bd0773207a9
tree3e14ab107c5df928735f9fad10fcffbe78c9b4ee
parent0c653fc9a51e4f6cc4d48f56bc5d94f4f2b4d6f5
qemu: migration: Fix blockdev config with VIR_MIGRATE_PARAM_MIGRATE_DISKS_DETECT_ZEROES

The idea of migration with VIR_MIGRATE_PARAM_MIGRATE_DISKS_DETECT_ZEROES
populated is to sparsify the image. The QEMU NBD client as it was
configured in commit 621f879adf98e2c93ac5c8c869733a57f06cd9aa would
signal to the destination to do thick allocation of holes which would
result in a non-sparse image for any backend except a qcow2 image which
I used to test it.

Switch to VIR_DOMAIN_DISK_DETECT_ZEROES_UNMAP and
VIR_DOMAIN_DISK_DISCARD_UNMAP which tells the NBD client (and that in
turn the NBD server) to preserve the sparse blocks it detected from the
image.

Fixes: 621f879adf98e2c93ac5c8c869733a57f06cd9aa
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_migration.c