public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Max Gurtovoy <mgurtovoy@nvidia.com>
Cc: hch@lst.de, sagi@grimberg.me, kbusch@kernel.org,
	linux-nvme@lists.infradead.org, hare@suse.de, axboe@kernel.dk,
	oren@nvidia.com, ngottlieb@nvidia.com, israelr@nvidia.com
Subject: Re: [PATCH 2/3] nvme-fabrics: check hostid using uuid_equal
Date: Thu, 11 May 2023 15:13:35 +0200	[thread overview]
Message-ID: <20230511131335.GB29790@lst.de> (raw)
In-Reply-To: <20230510180231.18865-3-mgurtovoy@nvidia.com>

On Wed, May 10, 2023 at 09:02:30PM +0300, Max Gurtovoy wrote:
> diff --git a/drivers/nvme/host/fabrics.h b/drivers/nvme/host/fabrics.h
> index dcac3df8a5f7..0f3763283222 100644
> --- a/drivers/nvme/host/fabrics.h
> +++ b/drivers/nvme/host/fabrics.h
> @@ -181,8 +181,9 @@ 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;
> +	}

Please don't add the pointless braces.  The actual change looks fine to
me, though.


  reply	other threads:[~2023-05-11 13:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-10 18:02 [PATCH v1 0/3] nvme-fabrics: fix un-expected behaviour related to hostnqn and hostid Max Gurtovoy
2023-05-10 18:02 ` [PATCH 1/3] nvme-fabrics: unify common code in admin and io queue connect Max Gurtovoy
2023-05-11 13:12   ` Christoph Hellwig
2023-05-10 18:02 ` [PATCH 2/3] nvme-fabrics: check hostid using uuid_equal Max Gurtovoy
2023-05-11 13:13   ` Christoph Hellwig [this message]
2023-05-11 13:27     ` Max Gurtovoy
2023-05-10 18:02 ` [PATCH 3/3] nvme-fabrics: prevent overriding of existing host Max Gurtovoy
2023-05-11 13:16   ` Christoph Hellwig
2023-05-11 13:26     ` Max Gurtovoy
2023-05-11 13:49       ` Christoph Hellwig
2023-05-11 13:59         ` Max Gurtovoy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230511131335.GB29790@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=hare@suse.de \
    --cc=israelr@nvidia.com \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=mgurtovoy@nvidia.com \
    --cc=ngottlieb@nvidia.com \
    --cc=oren@nvidia.com \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox