[libvirt] [PATCH 08/11] iscsi: Converge more createVport checks
Ján Tomko
jtomko at redhat.com
Mon Jan 2 14:30:13 UTC 2017
On Fri, Nov 18, 2016 at 09:26:34AM -0500, John Ferlan wrote:
>Remove duplicated code - make one path through
>
>Signed-off-by: John Ferlan <jferlan at redhat.com>
>---
> src/storage/storage_backend_scsi.c | 35 +++++++++++------------------------
> 1 file changed, 11 insertions(+), 24 deletions(-)
>
>diff --git a/src/storage/storage_backend_scsi.c b/src/storage/storage_backend_scsi.c
>index 9863880..df48b1a 100644
>--- a/src/storage/storage_backend_scsi.c
>+++ b/src/storage/storage_backend_scsi.c
>@@ -722,39 +722,26 @@ createVport(virConnectPtr conn,
>- if (virGetSCSIHostNumber(parent_hoststr, &parent_host) < 0)
>- goto cleanup;
>+ if (virGetSCSIHostNumber(parent_hoststr, &parent_host) < 0)
>+ goto cleanup;
>
>- /* NOTE:
>- * We do not save the parent_hoststr in adapter->data.fchost.parent
>- * since we could be writing out the 'def' to the saved XML config.
>- * If we wrote out the name in the XML, then future starts would
>- * always use the same parent rather than finding the "best available"
>- * parent. Besides we have a way to determine the parent based on
>- * the 'name' field.
>- */
Don't we need to preserve this note for future generations?
>+ if (adapter->data.fchost.parent && !virIsCapableFCHost(NULL, parent_host)) {
>+ virReportError(VIR_ERR_XML_ERROR,
>+ _("parent '%s' specified for vHBA is not vport capable"),
>+ parent_hoststr);
>+ goto cleanup;
> }
>
ACK
Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170102/d1cc9cde/attachment-0001.sig>
More information about the libvir-list
mailing list