Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH] nvme: don't hard code size of struct t10_pi_tuple
Date: Fri, 16 Jun 2017 08:28:40 +0200	[thread overview]
Message-ID: <20170616062840.GB6797@lst.de> (raw)
In-Reply-To: <1497533358-9901-1-git-send-email-sagi@grimberg.me>

On Thu, Jun 15, 2017@04:29:18PM +0300, Sagi Grimberg wrote:
> Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
> ---
>  drivers/nvme/host/core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index a5b7926cf7f6..761ca3e6ee2e 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -336,7 +336,8 @@ static inline blk_status_t nvme_setup_rw(struct nvme_ns *ns,
>  	 * unless this namespace is formated such that the metadata can be
>  	 * stripped/generated by the controller with PRACT=1.
>  	 */
> -	if (ns && ns->ms && (!ns->pi_type || ns->ms != 8) &&
> +	if (ns && ns->ms &&
> +	    (!ns->pi_type) || ns->ms != sizeof(struct t10_pi_tuple)) &&

This actually got the braces wrong, I'll fix it up.

  reply	other threads:[~2017-06-16  6:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-15 13:29 [PATCH] nvme: don't hard code size of struct t10_pi_tuple Sagi Grimberg
2017-06-16  6:28 ` Christoph Hellwig [this message]
2017-06-16  6:29   ` Christoph Hellwig

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=20170616062840.GB6797@lst.de \
    --to=hch@lst.de \
    /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