[PATCH] storage: do not clear vols before volume upload

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

 



Commit 5e54361c added virStoragePoolObjClearVols before refreshPool
to prevent duplicate volume entries.

However it is not needed here because we're not refreshing the pool yet,
just checking for the existence of the refresh callback.

The actual refresh is done via virStorageVolFDStreamCloseCb
in virStorageVolPoolRefreshThread, which already calls
virStoragePoolObjClearVols.
---
 src/storage/storage_driver.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index ce31e38..eb5f688 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -2353,15 +2353,14 @@ storageVolUpload(virStorageVolPtr obj,
 
     /* If we have a refreshPool, use the callback routine in order to
      * refresh the pool after the volume upload stream closes. This way
      * we make sure the volume and pool data are refreshed without user
      * interaction and we can just lookup the backend in the callback
      * routine in order to call the refresh API.
      */
-    virStoragePoolObjClearVols(pool);
     if (backend->refreshPool) {
         if (VIR_ALLOC(cbdata) < 0 ||
             VIR_STRDUP(cbdata->pool_name, pool->def->name) < 0)
             goto cleanup;
         if (vol->target.type == VIR_STORAGE_VOL_PLOOP &&
             VIR_STRDUP(cbdata->vol_path, vol->target.path) < 0)
             goto cleanup;
-- 
2.7.3

--
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]