Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: paul.grabinar@ranbarg.com (Paul Grabinar)
Subject: [PATCH] NVMe: Skip namespaces with interleaved meta-data
Date: Wed, 28 Jan 2015 20:50:24 +0000	[thread overview]
Message-ID: <54C94B90.20805@ranbarg.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1501281456010.15481@localhost.lm.intel.com>

On 28/01/15 15:11, Keith Busch wrote:
>
> Thanks for the info. NVMe doesn't appear to allow disabling metadata
> per-io except for a subset of formats. If that's correct, this driver
> would have to provide a valid protection buffer for all IO. Checking
> with committee comrades for clarification.
>

It is indeed a shame that they didn't define a null meta-data pointer as
meaning there is no meta-data. Maybe 1.3?

I got around this as follows.

Limit the maximum transfer so that all the meta-data fits into a single
page. As a side note, the protection information from the kernel needs
to be set to a maximum of one page anyway, as there is only a single PRP
entry for the meta-data and I don't think PRP lists are allowed here.

Allocate two 1 page DMA buffers per device, one will be used for reads
and one for writes.
Fill the write buffer with 0xFF, which means no protection information
is available.
When a read occurs and there is no kernel supplied protection
information, set the meta-data pointer to the read buffer.
When a write occurs and there is no kernel supplied protection
information, set the meta-data pointer to the write buffer. This will
write all the meta-data as 0xFF.

  reply	other threads:[~2015-01-28 20:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27 18:07 [PATCH] NVMe: Skip namespaces with interleaved meta-data Keith Busch
2015-01-27 21:57 ` David Darrington
2015-01-27 22:09   ` Keith Busch
2015-01-28  1:21     ` Keith Busch
2015-01-28  1:39       ` Martin K. Petersen
2015-01-28 15:11         ` Keith Busch
2015-01-28 20:50           ` Paul Grabinar [this message]
2015-01-28 21:16             ` Keith Busch
2015-01-28 21:46               ` Paul Grabinar
2015-01-28 22:08                 ` Martin K. Petersen
2015-01-28 22:17                   ` Keith Busch
2015-01-28 22:28                     ` Martin K. Petersen
2015-01-29  0:09                       ` Keith Busch
2015-01-29  0:57                         ` Martin K. Petersen
2015-01-29 15:44                           ` Keith Busch
2015-01-30  0:41                             ` Martin K. Petersen
2015-01-30  0:57                               ` Keith Busch
2015-01-28 22:17           ` Andrey Kuzmin

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=54C94B90.20805@ranbarg.com \
    --to=paul.grabinar@ranbarg.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox