]> xenbits.xensource.com Git - libvirt.git/commitdiff
storage: do not clear vols before volume upload
authorJán Tomko <jtomko@redhat.com>
Fri, 20 May 2016 09:42:56 +0000 (11:42 +0200)
committerJán Tomko <jtomko@redhat.com>
Mon, 23 May 2016 08:47:32 +0000 (10:47 +0200)
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

index ce31e38c1ec8a65dfca63215e10d046f4eea8881..eb5f688facebf4885e0053a61176661decb29d8d 100644 (file)
@@ -2357,7 +2357,6 @@ storageVolUpload(virStorageVolPtr obj,
      * 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)