[PATCH v2 2/3] nvme-fabrics: check hostid using uuid_equal
Hannes Reinecke
hare at suse.de
Thu May 11 11:45:20 PDT 2023
On 5/11/23 18:54, Max Gurtovoy wrote:
> Use a dedicated function to match uuids instead of duplicating it.
>
> Tested-by: Noam Gottlieb <ngottlieb at nvidia.com>
> Reviewed-by: Israel Rukshin <israelr at nvidia.com>
> Signed-off-by: Max Gurtovoy <mgurtovoy at nvidia.com>
> ---
>
> changes from v1:
> - address comments from Christoph
>
> ---
> drivers/nvme/host/fabrics.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/fabrics.h b/drivers/nvme/host/fabrics.h
> index dcac3df8a5f7..862bc4e5e3d9 100644
> --- a/drivers/nvme/host/fabrics.h
> +++ b/drivers/nvme/host/fabrics.h
> @@ -181,7 +181,7 @@ nvmf_ctlr_matches_baseopts(struct nvme_ctrl *ctrl,
> ctrl->state == NVME_CTRL_DEAD ||
> strcmp(opts->subsysnqn, ctrl->opts->subsysnqn) ||
> strcmp(opts->host->nqn, ctrl->opts->host->nqn) ||
> - memcmp(&opts->host->id, &ctrl->opts->host->id, sizeof(uuid_t)))
> + !uuid_equal(&opts->host->id, &ctrl->opts->host->id))
> return false;
>
> return true;
Reviewed-by: Hannes Reinecke <hare at suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman
More information about the Linux-nvme
mailing list