]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Revert "storage: Prior to creating a volume, refresh the pool"
authorJohn Ferlan <jferlan@redhat.com>
Thu, 8 Oct 2015 20:47:30 +0000 (16:47 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 4 Nov 2015 12:21:11 +0000 (07:21 -0500)
This reverts commit fdda37608a6e22406fbdfe4ac0c573a96a8d0417.

This commit only manages a symptom of finding a buildRet failure
where a volume was not listed in the pool, but someone created the
volume outside of libvirt in the pool being managed by libvirt.

src/storage/storage_driver.c

index 292ed9e13f91425508c1dd0029bd782278a8b65d..31b70958978f3225f48e5fd7d96f08ab2930c2d6 100644 (file)
@@ -1805,15 +1805,6 @@ storageVolCreateXML(virStoragePoolPtr obj,
     if (virStorageVolCreateXMLEnsureACL(obj->conn, pool->def, voldef) < 0)
         goto cleanup;
 
-    /* While not perfect, refresh the list of volumes in the pool and
-     * then check that the incoming name isn't already in the pool.
-     */
-    if (backend->refreshPool) {
-        virStoragePoolObjClearVols(pool);
-        if (backend->refreshPool(obj->conn, pool) < 0)
-            goto cleanup;
-    }
-
     if (virStorageVolDefFindByName(pool, voldef->name)) {
         virReportError(VIR_ERR_STORAGE_VOL_EXIST,
                        _("'%s'"), voldef->name);