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.
This commit is contained in:
Ján Tomko 2016-05-20 11:42:56 +02:00
parent 71cfa668eb
commit 21fdb4fe70

View 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)