Relax duplicate SCSI host pool checking

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.
This commit is contained in:
Ján Tomko 2014-11-01 12:11:38 +01:00
parent 77911d305d
commit 593892314a

View 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