From: Tokunori Ikegami <ikegami.t@gmail.com>
To: Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@infradead.org>
Cc: linux-nvme@lists.infradead.org
Subject: Re: [PATCH v4] nvme: change nvme_ns_has_pi() to nvme_ns_supports_pract()
Date: Wed, 23 Oct 2024 23:44:13 +0900 [thread overview]
Message-ID: <a41a55be-dd3d-477b-8eac-27f80da63ed0@gmail.com> (raw)
In-Reply-To: <Zxj4SDRxSJfca_Wa@kbusch-mbp>
On 2024/10/23 22:21, Keith Busch wrote:
> On Wed, Oct 23, 2024 at 06:19:03AM -0700, Christoph Hellwig wrote:
>> On Wed, Oct 23, 2024 at 07:14:20AM -0600, Keith Busch wrote:
>>> You can't just have a patch declare that PRACT works this way. The spec
>>> says it only works if ms == PI tuple size, otherwise it doesn't do
>>> anything.
>> Well, that means the patch as-is is broken, isn't it?
> That's what I've been saying since v1. For some reason that feedback
> isn't getting through...
Sorry for wasting your time and confusing but if you have a time please
let me confirm again below. (It is okay when you have a time case.)
About the mention "The spec says it only works if ms == PI tuple size,
otherwise it doesn't do anything." do you mention for example the
specification description below?
--------------------------------------------------------------------------------
(NVM-Express-NVM-Command-Set-Specification-Revision-1.1-2024.08.05-Ratified)
5.3.2.1 Protection Information and Write Commands
Figure 166 provides some examples of the protection information
processing that may occur as a side effect
of a Write command.
...
If the namespace is formatted with protection information and the PRACT
bit is set to ‘1’, then:
...
2. If the namespace is formatted with Metadata Size greater than
protection information size, then the
logical block data and the metadata are transferred from the host buffer
to the controller. As the
metadata passes through the controller, the controller overwrites the
protection information portion
of the metadata without checking the protection information portion
regardless of PRCHK settings.
The logical block data and metadata are written to the NVM (i.e., the
metadata field remains the
same size in the NVM and the host buffer). The location of the
protection information within the
metadata is configured when the namespace is formatted (refer to the DPS
field in Figure 114).
Figure 166: Write Command 16b Guard Protection Information Processing
...
[figure b]
b) MD>8 (e.g., 16), PI, PRACT=0: Metadata remains same size in NVM and
host buffer
...
[figure d]
d) MD>8 (e.g., 16), PI, PRACT=1: Metadata remains same size in NVM and
host buffer
--------------------------------------------------------------------------------
In the example case b) and d) the 16B MD data should be sent by the host
application but the driver does not set or handle any 8MD and 8PI. Is
this understanding correct?
By the way actually does the kernel nvme driver support the ms >= PI
LBAF case as correct by the current implementation? (Seems only
supported for the ms == PI LBAF case only.)
Note: Only the function nvme_configure_metadata() checks the ms >= PI
case to set PI type.
next prev parent reply other threads:[~2024-10-23 14:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-23 10:08 [PATCH v4] nvme: change nvme_ns_has_pi() to nvme_ns_supports_pract() Tokunori Ikegami
2024-10-23 12:45 ` Christoph Hellwig
2024-10-23 13:14 ` Keith Busch
2024-10-23 13:19 ` Christoph Hellwig
2024-10-23 13:21 ` Keith Busch
2024-10-23 14:44 ` Tokunori Ikegami [this message]
2024-10-23 15:11 ` Keith Busch
2024-10-23 16:33 ` Tokunori Ikegami
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=a41a55be-dd3d-477b-8eac-27f80da63ed0@gmail.com \
--to=ikegami.t@gmail.com \
--cc=hch@infradead.org \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
/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