From: Ján Tomko Date: Fri, 20 May 2016 09:42:56 +0000 (+0200) Subject: storage: do not clear vols before volume upload X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=21fdb4fe707c8cccba8225fc82c189b9f5130153;p=libvirt.git storage: do not clear vols before volume upload 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. --- diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index ce31e38c1e..eb5f688fac 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -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)