[libvirt] [PATCH 3/3] rbd: optionally compute volume allocation from capacity
Michal Privoznik
mprivozn at redhat.com
Tue Mar 19 09:52:06 UTC 2019
On 3/15/19 4:17 PM, jdillama at redhat.com wrote:
> From: Jason Dillaman <dillaman at 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 at 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);
>
This will need to adapt to changes I'm suggesting in 2/3 but the idea
looks good.
Michal
More information about the libvir-list
mailing list