Fix vPort management: FC vHBA creation

When creating a virtual FC HBA with virsh/libvirt API, an error message
will be returned: "error: Node device not found",
also the 'nodedev-dumpxml' shows wrong information of wwpn & wwnn
for the new created device.

Signed-off-by: xschen@tnsoft.com.cn

This reverts f90af69 which switched wwpn & wwwn in the wrong place.

https://www.kernel.org/doc/Documentation/scsi/scsi_fc_transport.txt
This commit is contained in:
Dennis Chen 2013-06-28 11:59:51 +02:00 committed by Ján Tomko
parent a757822233
commit 3c0d5e224c
2 changed files with 6 additions and 6 deletions

View File

@ -659,8 +659,8 @@ createVport(virStoragePoolSourceAdapter adapter)
if (getHostNumber(adapter.data.fchost.parent, &parent_host) < 0)
return -1;
if (virManageVport(parent_host, adapter.data.fchost.wwnn,
adapter.data.fchost.wwpn, VPORT_CREATE) < 0)
if (virManageVport(parent_host, adapter.data.fchost.wwpn,
adapter.data.fchost.wwnn, VPORT_CREATE) < 0)
return -1;
virFileWaitForDevices();
@ -682,8 +682,8 @@ deleteVport(virStoragePoolSourceAdapter adapter)
if (getHostNumber(adapter.data.fchost.parent, &parent_host) < 0)
return -1;
if (virManageVport(parent_host, adapter.data.fchost.wwnn,
adapter.data.fchost.wwpn, VPORT_DELETE) < 0)
if (virManageVport(parent_host, adapter.data.fchost.wwpn,
adapter.data.fchost.wwnn, VPORT_DELETE) < 0)
return -1;
return 0;

View File

@ -1792,8 +1792,8 @@ virManageVport(const int parent_host,
if (virAsprintf(&vport_name,
"%s:%s",
wwnn,
wwpn) < 0) {
wwpn,
wwnn) < 0) {
virReportOOMError();
goto cleanup;
}