From: Christoph Hellwig <hch@lst.de>
To: "Javier González" <jg@lightnvm.io>
Cc: hch@lst.de, sagi@grimberg.me, keith.busch@intel.com,
linux-nvme@lists.infradead.org, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Javier González" <javier@cnexlabs.com>
Subject: Re: [PATCH 1/3] nvme: do not check for ns on rw path
Date: Fri, 3 Nov 2017 13:53:40 +0100 [thread overview]
Message-ID: <20171103125339.GA25186@lst.de> (raw)
In-Reply-To: <1509703370-20379-2-git-send-email-javier@cnexlabs.com>
> - if (ns && ns->ms &&
> + if (ns->ms &&
> (!ns->pi_type || ns->ms != sizeof(struct t10_pi_tuple)) &&
> !blk_integrity_rq(req) && !blk_rq_is_passthrough(req))
> return BLK_STS_NOTSUPP;
blk_rq_is_passthrough also can't be true here.
How about:
if (ns->ms && !blk_integrity_rq(req) &&
(!ns->pi_type || ns->ms != sizeof(struct t10_pi_tuple)))
return BLK_STS_NOTSUPP;
Although I have to admit I don't really understand what this check
is even trying to do. It basically checks for a namespace that has
a format with metadata that is not T10 protection information and
then rejects all I/O to it. Why are we even creating a block device
node for such a thing?
WARNING: multiple messages have this Message-ID (diff)
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH 1/3] nvme: do not check for ns on rw path
Date: Fri, 3 Nov 2017 13:53:40 +0100 [thread overview]
Message-ID: <20171103125339.GA25186@lst.de> (raw)
In-Reply-To: <1509703370-20379-2-git-send-email-javier@cnexlabs.com>
> - if (ns && ns->ms &&
> + if (ns->ms &&
> (!ns->pi_type || ns->ms != sizeof(struct t10_pi_tuple)) &&
> !blk_integrity_rq(req) && !blk_rq_is_passthrough(req))
> return BLK_STS_NOTSUPP;
blk_rq_is_passthrough also can't be true here.
How about:
if (ns->ms && !blk_integrity_rq(req) &&
(!ns->pi_type || ns->ms != sizeof(struct t10_pi_tuple)))
return BLK_STS_NOTSUPP;
Although I have to admit I don't really understand what this check
is even trying to do. It basically checks for a namespace that has
a format with metadata that is not T10 protection information and
then rejects all I/O to it. Why are we even creating a block device
node for such a thing?
next prev parent reply other threads:[~2017-11-03 12:53 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-03 10:02 [PATCH 0/3] nvme: small fixes reported by smatch Javier González
2017-11-03 10:02 ` Javier González
2017-11-03 10:02 ` [PATCH 1/3] nvme: do not check for ns on rw path Javier González
2017-11-03 10:02 ` Javier González
2017-11-03 12:53 ` Christoph Hellwig [this message]
2017-11-03 12:53 ` Christoph Hellwig
2017-11-03 13:00 ` Javier González
2017-11-03 13:00 ` Javier González
2017-11-03 15:02 ` Keith Busch
2017-11-03 15:02 ` Keith Busch
2017-11-04 8:18 ` Christoph Hellwig
2017-11-04 8:18 ` Christoph Hellwig
2017-11-04 15:38 ` Keith Busch
2017-11-04 15:38 ` Keith Busch
2017-11-06 9:13 ` Christoph Hellwig
2017-11-06 9:13 ` Christoph Hellwig
2017-11-06 9:13 ` Christoph Hellwig
2017-11-06 14:43 ` Keith Busch
2017-11-06 14:43 ` Keith Busch
2017-11-03 10:02 ` [PATCH 2/3] nvme: compare NQN string with right size Javier González
2017-11-03 10:02 ` Javier González
2017-11-03 12:54 ` Christoph Hellwig
2017-11-03 12:54 ` Christoph Hellwig
2017-11-03 12:54 ` Christoph Hellwig
2017-11-03 12:56 ` Javier González
2017-11-03 12:56 ` Javier González
2017-11-03 10:02 ` [PATCH 3/3] nvme: fix eui_show() print format Javier González
2017-11-03 10:02 ` Javier González
2017-11-03 12:55 ` Christoph Hellwig
2017-11-03 12:55 ` Christoph Hellwig
2017-11-03 12:55 ` Christoph Hellwig
2017-11-03 15:13 ` Keith Busch
2017-11-03 15:13 ` Keith Busch
2017-11-03 15:13 ` Keith Busch
2017-11-03 15:16 ` Joe Perches
2017-11-03 15:16 ` Joe Perches
2017-11-03 15:16 ` Joe Perches
2017-11-04 11:22 ` Javier González
2017-11-04 11:22 ` Javier González
2017-11-07 16:28 ` Christoph Hellwig
2017-11-07 16:28 ` Christoph Hellwig
2017-11-07 16:28 ` Christoph Hellwig
2017-11-07 16:36 ` Javier González
2017-11-07 16:36 ` Javier González
2017-11-07 16:36 ` Javier González
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=20171103125339.GA25186@lst.de \
--to=hch@lst.de \
--cc=javier@cnexlabs.com \
--cc=jg@lightnvm.io \
--cc=keith.busch@intel.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.