All of lore.kernel.org
 help / color / mirror / Atom feed
From: willy@linux.intel.com (Matthew Wilcox)
Subject: [PATCH] nvme: add a constant for the identify payload size
Date: Thu, 10 Mar 2016 09:30:18 -0500	[thread overview]
Message-ID: <20160310143018.GE2464@linux.intel.com> (raw)
In-Reply-To: <20160310080628.GB716@lst.de>

On Thu, Mar 10, 2016@09:06:28AM +0100, Christoph Hellwig wrote:
> On Wed, Mar 09, 2016@02:07:31PM -0500, Matthew Wilcox wrote:
> > On Wed, Mar 09, 2016@05:54:37PM +0100, Christoph Hellwig wrote:
> > > The NVMe spec specifies a hardcoded payload length of 4k for all
> > > types of Identify commands.  Use a constant instead of hardcoded
> > > values that can be confused for the page size.
> > 
> > I think the problem here is that we don't have a struct for nvme_ns_list.
> 
> I think this structure is useful, but I'd still like to see a constant
> for the identify payload - the spec clearly specifies it as a hardcoded
> limit for all of identify.  E.g. from NVMe 1.2, section 5.11:

The spec clearly specifies a lot of things as hardcoded values, and our
reaction to that is to create structs that are that size, and assert
that they are that size (in case somebody mistakenly tweaks the struct).
This patch makes the ns_list be treated the same way as every other
structure, rather than treating the size of the data block returned from
identify as being special.

  reply	other threads:[~2016-03-10 14:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09 16:54 [PATCH] nvme: add a constant for the identify payload size Christoph Hellwig
2016-03-09 16:57 ` Sagi Grimberg
2016-03-09 19:07 ` Matthew Wilcox
2016-03-10  8:06   ` Christoph Hellwig
2016-03-10 14:30     ` Matthew Wilcox [this message]
2016-03-10  8:27   ` Johannes Thumshirn
2016-03-10  8:26 ` Johannes Thumshirn

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=20160310143018.GE2464@linux.intel.com \
    --to=willy@linux.intel.com \
    /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.