mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 07:42:56 +00:00
storage: Returns earlier if source adapter of the scsi pool is a HBA
It makes no sense to go forward to get the parent host number of a HBA, and treat the HBA as a vHBA with trying to delete it. Signed-off-by: Osier Yang <jyang@redhat.com>
This commit is contained in:
parent
c7ccd2c44b
commit
b96651dec0
@ -667,6 +667,14 @@ deleteVport(virStoragePoolSourceAdapter adapter)
|
||||
if (adapter.type != VIR_STORAGE_POOL_SOURCE_ADAPTER_TYPE_FC_HOST)
|
||||
return 0;
|
||||
|
||||
/* It must be a HBA instead of a vHBA as long as "parent"
|
||||
* is NULL. "createVport" guaranteed "parent" for a vHBA
|
||||
* cannot be NULL, it's either specified in XML, or detected
|
||||
* automatically.
|
||||
*/
|
||||
if (!adapter.data.fchost.parent)
|
||||
return 0;
|
||||
|
||||
if (!(virGetFCHostNameByWWN(NULL, adapter.data.fchost.wwnn,
|
||||
adapter.data.fchost.wwpn)))
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user