Re: [libvirt] [PATCH] Refresh storage volume on dumpxml

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 02, 2009 at 02:00:22PM -0400, Cole Robinson wrote:
> The storage driver refreshes a volume's capacity+allocation data when
> the 'info' command is called. Seems that we should also update it when
> dumpxml is called, which also returns size information.

Yes, that's a good point.

ACK


> commit 26ec9d5cd9ae919ccdf3d122dcf3832f61f9476f
> Author: Cole Robinson <crobinso@xxxxxxxxxx>
> Date:   Wed Apr 1 16:07:12 2009 -0400
> 
>     Refresh volume alloc/capacity when dumping XML.
> 
> diff --git a/src/storage_driver.c b/src/storage_driver.c
> index b261843..97fcf69 100644
> --- a/src/storage_driver.c
> +++ b/src/storage_driver.c
> @@ -1389,6 +1389,10 @@ storageVolumeGetXMLDesc(virStorageVolPtr obj,
>      if ((backend = virStorageBackendForType(pool->def->type)) == NULL)
>          goto cleanup;
>  
> +    if (backend->refreshVol &&
> +        backend->refreshVol(obj->conn, pool, vol) < 0)
> +        goto cleanup;
> +
>      ret = virStorageVolDefFormat(obj->conn, pool->def, vol);
>  
>  cleanup:


Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]