[libvirt] [REPOST PATCH 5/6] Revert "storage: Prior to creating a volume, refresh the pool"

John Ferlan jferlan at redhat.com
Wed Oct 28 11:54:52 UTC 2015


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.

Signed-off-by: John Ferlan <jferlan at redhat.com>
---
 src/storage/storage_driver.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index 292ed9e..31b7095 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -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);
-- 
2.1.0




More information about the libvir-list mailing list