[libvirt] [PATCH] Refresh storage volume on dumpxml

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

 



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.

Thanks,
Cole
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:
--
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]