[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH v2] storage: Disallow usage of the HBA for a fc_host backing



> One would hope it doesn't fail...

Even if it does, virSCSIHostGetNumber does report an error already.

>
> Your suggestions make checkName much cleaner:
>
>     if (virSCSIHostGetNumber(name, &host_num) &&
>         virVHBAIsVportCapable(NULL, host_num))
>         return true;
>

if virSCSIHostGetNumber fails, it will report an error on its own but you'll
also format the one below which wouldn't be true, because at that point you
still don't know whether wwnn/wwpn refer to either an HBA or a vHBA

>     virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
>                    _("the wwnn/wwpn for '%s' are assigned to an HBA"),
>                     name);
>     return false;
>
> and only add :
>
>     if (!(checkName(name)))
>         goto cleanup
>
> to the createVport
>
> The @name to @scsi_host_name can return to checkParent.  I retest and

I'm fine with ^this change.

Erik


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]