From: Eric Biggers <ebiggers@kernel.org>
To: Anuj Gupta/Anuj Gupta <anuj20.g@samsung.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
jack@suse.cz, anuj1072538@gmail.com, axboe@kernel.dk,
viro@zeniv.linux.org.uk, brauner@kernel.org, hch@infradead.org,
linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
joshi.k@samsung.com
Subject: Re: [RFC] fs: add ioctl to query protection info capabilities
Date: Thu, 29 May 2025 17:59:34 +0000 [thread overview]
Message-ID: <20250529175934.GB3840196@google.com> (raw)
In-Reply-To: <fec86763-dd0e-4099-9347-e85aa4a22277@samsung.com>
On Thu, May 29, 2025 at 12:42:45PM +0530, Anuj Gupta/Anuj Gupta wrote:
> On 5/29/2025 8:32 AM, Martin K. Petersen wrote:
> >
> > Hi Anuj!
> >
> > Thanks for working on this!
> >
> Hi Martin,
> Thanks for the feedback!
>
> >> 4. tuple_size: size (in bytes) of the protection information tuple.
> >> 6. pi_offset: offset of protection info within the tuple.
> >
> > I find this a little confusing. The T10 PI tuple is <guard, app, ref>.
> >
> > I acknowledge things currently are a bit muddy in the block layer since
> > tuple_size has been transmogrified to hold the NVMe metadata size.
> >
> > But for a new user-visible interface I think we should make the
> > terminology clear. The tuple is the PI and not the rest of the metadata.
> >
> > So I think you'd want:
> >
> > 4. metadata_size: size (in bytes) of the metadata associated with each interval.
> > 6. pi_offset: offset of protection information tuple within the metadata.
> >
>
> Yes, this representation looks better. Will make this change.
>
> >> +#define FILE_PI_CAP_INTEGRITY (1 << 0)
> >> +#define FILE_PI_CAP_REFTAG (1 << 1)
> >
> > You'll also need to have corresponding uapi defines for:
> >
> > enum blk_integrity_checksum {
> > BLK_INTEGRITY_CSUM_NONE = 0,
> > BLK_INTEGRITY_CSUM_IP = 1,
> > BLK_INTEGRITY_CSUM_CRC = 2,
> > BLK_INTEGRITY_CSUM_CRC64 = 3,
> > } __packed ;
> >
>
> Right, I'll add these definitions to the UAPI.
Would it make sense to give the CRCs clearer names? For example CRC16_T10DIF
and CRC64_NVME.
- Eric
next prev parent reply other threads:[~2025-05-29 17:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20250527105950epcas5p1b53753ab614bf6bde4ffbf5165c7d263@epcas5p1.samsung.com>
2025-05-27 10:42 ` [RFC] fs: add ioctl to query protection info capabilities Anuj Gupta
2025-05-29 3:02 ` Martin K. Petersen
2025-05-29 7:12 ` Anuj Gupta/Anuj Gupta
2025-05-29 17:59 ` Eric Biggers [this message]
2025-05-30 5:24 ` Christian Brauner
2025-06-03 18:43 ` Anuj gupta
2025-06-04 7:53 ` Christian Brauner
2025-06-04 7:57 ` Christoph Hellwig
2025-06-05 8:24 ` Christian Brauner
2025-05-29 21:14 ` [RFC] " Andreas Dilger
2025-06-03 3:12 ` [RFC] fs: " Martin K. Petersen
2025-06-03 6:30 ` Christoph Hellwig
2025-06-04 1:48 ` Martin K. Petersen
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=20250529175934.GB3840196@google.com \
--to=ebiggers@kernel.org \
--cc=anuj1072538@gmail.com \
--cc=anuj20.g@samsung.com \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=joshi.k@samsung.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=viro@zeniv.linux.org.uk \
/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