]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: Introduce virStorageSourceUpdateBackingSizes
authorJohn Ferlan <jferlan@redhat.com>
Thu, 1 Dec 2016 21:39:36 +0000 (16:39 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 12 Dec 2016 21:04:17 +0000 (16:04 -0500)
commit3039ec962ed45cb4393579bcd443a2e9c45ec00b
tree31d1e8c91beed97791a013f5252a1b78f893fe3a
parentc5f6151390ff0a8e65014172bb8c0a8d312c3353
util: Introduce virStorageSourceUpdateBackingSizes

Instead of having duplicated code in qemuStorageLimitsRefresh and
virStorageBackendUpdateVolTargetInfoFD to fill in the storage backing
source or volume allocation, capacity, and physical values - create a
common API that will handle the details for both.

The common API will fill in "default" capacity values as well - although
those more than likely will be overridden by subsequent code. Having just
one place to make the determination of what the values should be will
make things be more consistent.

For the QEMU code - the data filled in will be for inactive domains
for the GetBlockInfo and DomainGetStatsOneBlock API's. For the storage
backend code - the data will be filled in during the volume updates.

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/libvirt_private.syms
src/qemu/qemu_driver.c
src/storage/storage_backend.c
src/util/virstoragefile.c
src/util/virstoragefile.h