public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Milan Broz <gmazyland@gmail.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-block@vger.kernel.org, axboe@kernel.dk, hch@infradead.org
Subject: Re: [PATCH] docs: sysfs-block: Clarify integrity sysfs attributes for non-PI metadata
Date: Wed, 05 Mar 2025 21:28:44 -0500	[thread overview]
Message-ID: <yq1pliuoqek.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <8aaa0b97-ef9a-4bd8-8f8f-7c6869ff4c26@gmail.com> (Milan Broz's message of "Mon, 3 Mar 2025 19:52:48 +0100")


Milan,

> thanks for the clarification, should I just update the
> patch and add your signed-off line?

Feel free to tweak and submit. You can add a Co-developed-by tag, if you
wish.

> There can be "none" and "nop" here. My understanding was that "none"
> means the device does not support any metadata space (no T10 profile
> possible) while "nop" is that there is a metadata space but it is not
> used by any known T10 profile. Is it correct?

Looks like it, yes. We didn't originally register a profile unless the
device was capable. So the "nop" vs. "none" distinction is a recent
addition.

>  - a flag that device supports non-PI metadata (is it that "nop"
>  above?) If not, then there is no way to check for non-PI metadata for
>  non-NVMe devices (as metadata_bytes is present on NVMe only)

Currently, yes.

>  -  maximal size of usable metadata (currently NVMe metadata_bytes
>  field).

Aside from PI, SCSI doesn't support separate metadata. It does, however,
support larger logical block sizes. So 520, 524, 528, etc. And those
block sizes may be accompanied by 8 bytes of PI. But the non-PI metadata
is considered part of the logical block data and not a separate entity
like in NVMe.

So until NVMe happened, we didn't have a situation where we could
actually have non-PI metadata in a buffer separate from the data. And
the block integrity interface still reflects that.

> I think that metadata_bytes would be enough, if supported for all
> block devices (note we emulate metadata in dm-integrity, so it should
> be set there too).

That's fine with me. I do prefer to distinguish between PI and non-PI
metadata. Even though they may be sharing a buffer in the NVMe case.

-- 
Martin K. Petersen	Oracle Linux Engineering

  reply	other threads:[~2025-03-06  2:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20250225092525epcas5p31dd0a19ffdfb39f3f2ce4acd1c6da7ee@epcas5p3.samsung.com>
2025-02-25  9:23 ` sysfs integrity fields use Milan Broz
2025-02-25 10:10   ` Kanchan Joshi
2025-02-25 10:44     ` Kanchan Joshi
2025-02-25 11:03     ` Milan Broz
2025-02-26 10:04       ` Kanchan Joshi
2025-02-25 15:38   ` Christoph Hellwig
2025-02-26 14:02     ` Milan Broz
2025-02-27 14:46     ` [PATCH] docs: sysfs-block: Clarify integrity sysfs attributes for non-PI metadata Milan Broz
2025-03-03 17:25       ` Martin K. Petersen
2025-03-03 18:52         ` Milan Broz
2025-03-06  2:28           ` Martin K. Petersen [this message]
2025-03-18 15:44             ` [PATCH] docs: sysfs-block: Clarify integrity sysfs attributes Milan Broz
2025-03-20  7:04               ` Christoph Hellwig
2025-03-20 11:44               ` Jens Axboe

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=yq1pliuoqek.fsf@ca-mkp.ca.oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=axboe@kernel.dk \
    --cc=gmazyland@gmail.com \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.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