From: Jason Dillaman <dillaman(a)redhat.com>
Use the new 'refresh_volume_allocation' pool override to skip
computing the actual volume usage if disabled.
Signed-off-by: Jason Dillaman <dillaman(a)redhat.com>
---
src/storage/storage_backend_rbd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/storage/storage_backend_rbd.c b/src/storage/storage_backend_rbd.c
index e67911f928..1b01fbb3a8 100644
--- a/src/storage/storage_backend_rbd.c
+++ b/src/storage/storage_backend_rbd.c
@@ -564,7 +564,8 @@ volStorageBackendRBDRefreshVolInfo(virStorageVolDefPtr vol,
vol->type = VIR_STORAGE_VOL_NETWORK;
vol->target.format = VIR_STORAGE_FILE_RAW;
- if (volStorageBackendRBDUseFastDiff(features, flags)) {
+ if (def->refresh_volume_allocation == VIR_STORAGE_VOL_REFRESH_ALLOCATION_DEFAULT
&&
+ volStorageBackendRBDUseFastDiff(features, flags)) {
VIR_DEBUG("RBD image %s/%s has fast-diff feature enabled. "
"Querying for actual allocation",
def->source.name, vol->name);
--
2.20.1