]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: tighten semantics of 'size' when resizing block devices
authorDaniel P. Berrangé <berrange@redhat.com>
Wed, 3 Jan 2024 16:36:45 +0000 (16:36 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 9 Jan 2024 11:57:13 +0000 (11:57 +0000)
commit024d6dc2631123d12969bdd8213be573373cf3c3
tree1bb46f3c0134444d67da51f6399e64bb1e5757a7
parent784d90fe685b0aa3cbbc2e4a934749eacb15b34b
qemu: tighten semantics of 'size' when resizing block devices

When VIR_DOMAIN_BLOCK_RESIZE_CAPACITY is set, the 'size' parameter
is currently ignored. Since applications must none the less pass a
value for this parameter, it is preferrable to declare some explicit
semantics for it.

This declare that the parameter must be 0, or the exact size of the
underlying block device. The latter gives the management application
the ability to sanity check that the block device size matches what
they think it should be.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/libvirt-domain.c
src/qemu/qemu_driver.c