All of lore.kernel.org
 help / color / mirror / Atom feed
From: keith.busch@intel.com (Keith Busch)
Subject: Partitions and end-to-end protection
Date: Tue, 14 Jul 2015 19:25:53 +0000 (UTC)	[thread overview]
Message-ID: <alpine.LNX.2.00.1507141916210.15930@localhost.lm.intel.com> (raw)
In-Reply-To: <yq11tgash12.fsf@sermon.lab.mkp.net>

On Tue, 14 Jul 2015, Martin K. Petersen wrote:
> But the fundamental question remains: Why is it a prerequisite for the
> NVMe integrity profile to be added before the disk is live? Nobody else
> requires this (sd, md, dm).

NVMe doesn't provide a way to disable transferring metadata
per-io. Capacity zero prevents IO when it's added because we don't have
a metadata buffer to assign CMD.MPTR. The drive will unconditionally
attempt DMA to/from MPTR, so it's potential memory and data corruption
if we let it happen.

An alternative to requiring blk integrity provide the metadata buffer,
we could have the driver allocate a large scratch buffer just so we have
something valid to set MPTR even. I didn't do that initially because we
can't use the metadata for anything at that point, and it seems odd to
have the driver implement this special case just to satisfy add_disk().

  reply	other threads:[~2015-07-14 19:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13 18:50 Partitions and end-to-end protection Paul Grabinar
2015-07-13 19:16 ` Keith Busch
2015-07-13 19:22   ` Paul Grabinar
2015-07-14 18:06   ` Christoph Hellwig
2015-07-14 18:13     ` Dan Williams
2015-07-14 18:15       ` Christoph Hellwig
2015-07-14 18:25         ` Dan Williams
2015-07-14 18:41     ` Martin K. Petersen
2015-07-14 18:43       ` Christoph Hellwig
2015-07-14 18:58         ` Martin K. Petersen
2015-07-14 19:25           ` Keith Busch [this message]
2015-07-14 19:38             ` Martin K. Petersen
2015-07-14 19:45               ` Keith Busch
2015-07-14 20:07                 ` Martin K. Petersen
2015-07-14 20:14                   ` Keith Busch

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=alpine.LNX.2.00.1507141916210.15930@localhost.lm.intel.com \
    --to=keith.busch@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.