]> xenbits.xensource.com Git - libvirt.git/commitdiff
Relax duplicate SCSI host pool checking
authorJán Tomko <jtomko@redhat.com>
Sat, 1 Nov 2014 11:11:38 +0000 (12:11 +0100)
committerJán Tomko <jtomko@redhat.com>
Sat, 1 Nov 2014 11:15:01 +0000 (12:15 +0100)
Since commit 3f99d64 no new scsi_host pools can be defined
if one of the already defined scsi_host pools does not refer
to an accessible scsi_host adapter.

Relax the check by skipping over these inaccessible pools
when checking for duplicates.

src/conf/storage_conf.c

index 0317b06edd5bc97326e9bdaa126ffc6aa3b3fdd1..afd6cd46521937a2b5de8461c9ab7d36e0656d99 100644 (file)
@@ -2175,7 +2175,7 @@ virStoragePoolSourceFindDuplicate(virStoragePoolObjListPtr pools,
                 if (getSCSIHostNumber(pool->def->source.adapter,
                                       &pool_hostnum) < 0 ||
                     getSCSIHostNumber(def->source.adapter, &def_hostnum) < 0)
-                    goto error;
+                    break;
                 if (pool_hostnum == def_hostnum)
                     matchpool = pool;
             }
@@ -2217,10 +2217,6 @@ virStoragePoolSourceFindDuplicate(virStoragePoolObjListPtr pools,
         ret = -1;
     }
     return ret;
-
- error:
-    virStoragePoolObjUnlock(pool);
-    return -1;
 }
 
 void