]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: Introduce virStorageSourceUpdateCapacity
authorJohn Ferlan <jferlan@redhat.com>
Thu, 1 Dec 2016 21:23:58 +0000 (16:23 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 12 Dec 2016 21:04:17 +0000 (16:04 -0500)
commit9d734b60a7f49356abc4e8c402be8e5957af56fc
tree5e61f615b9aa91e458eed75e26712773aad3ad76
parent3039ec962ed45cb4393579bcd443a2e9c45ec00b
util: Introduce virStorageSourceUpdateCapacity

Instead of having duplicated code in qemuStorageLimitsRefresh and
virStorageBackendUpdateVolTargetInfo to get capacity specific data
about the storage backing source or volume -- create a common API
to handle the details for both.

As a side effect, virStorageFileProbeFormatFromBuf returns to being
a local/static helper to virstoragefile.c

For the QEMU code - if the probe is done, then the format is saved so
as to avoid future such probes.

For the storage backend code, there is no need to deal with the probe
since we cannot call the new API if target->format == NONE.

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