Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH] NVMe: Metadata and PI format support
Date: Tue, 17 Feb 2015 16:05:42 +0000 (UTC)	[thread overview]
Message-ID: <alpine.LNX.2.00.1502171449101.32385@localhost.lm.intel.com> (raw)
In-Reply-To: <80B89753B40C5141A3E2D53FE7A2A8A99979435A@NTXBOIMBX02.micron.com>

On Mon, 16 Feb 2015, Sam Bradshaw (sbradshaw) wrote:
>> +	p = kmap_atomic(bip->bip_vec->bv_page);
>
> I think you want:
> p = kmap_atomic(bip->bip_vec->bv_page) + bip->bip_vec->bv_offset;

Yep, nice catch.

>> +	/* XXX: PI implementation requires metadata equal t10 pi tuple size */
>> +	pi_type = ns->ms == sizeof(struct t10_pi_tuple) ?
>> +					id->dps & NVME_NS_DPS_PI_MASK : 0;
>
> If there is interest in incorporating this support, we can provide
> a patch on top of this that enables 16b/32b/64b metadata with PI and
> supports PIL={0,1}

I would also like that to work. I was hoping to reuse the
t10_pi_generate/verify functions for this. Those can work if the
iter->prot_buf is incremented by the blk_intergity's tuple_size rather
than just the 8-byte PI field.

That'd work with PIL=0, not sure what to do with PIL=1. Maybe we should
just define our own functions for nvme even though they'd mostly be the
same as the ones scsi uses.

> -Sam

  reply	other threads:[~2015-02-17 16:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-31  2:11 [PATCH] NVMe: Metadata and PI format support Keith Busch
2015-02-16 18:53 ` Sam Bradshaw (sbradshaw)
2015-02-17 16:05   ` Keith Busch [this message]
2015-02-17 17:03     ` Sam Bradshaw
2015-02-19 17:05       ` Keith Busch
2015-02-19 17:45         ` Sam Bradshaw (sbradshaw)

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.1502171449101.32385@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox