Linux NFS development
 help / color / mirror / Atom feed
* Re: support for RT data checksums v2
       [not found] <20261104085929.317544-1-hch@lst.de>
@ 2026-12-03 17:11 ` Benjamin Coddington
  2026-12-04  9:20   ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Coddington @ 2026-12-03 17:11 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Carlos Maiolino, linux-xfs, linux-fsdevel, Chuck Lever,
	Thomas Haynes, Linux NFS Mailing List

On 4 Nov 2026, at 3:57, Christoph Hellwig wrote:
>  - exposing the checksum to userspace through io_uring with
>    IORING_RW_ATTR_FLAG_PI.  A prototype of this exists, but it needs
>    a bit more rework of common code than I'd like for the initial
>    review.

knfsd could use this too, as a pNFS data server.

The flexfiles v2 draft (draft-haynes-nfsv4-flexfiles-v2, Tom's on Cc)
has the client checksum each chunk it writes to a data server, and the
data server stores that and hands it back on read.  crc32c is one of
the algorithms.  With rtcsum underneath, nfsd could pass the client's
crc down with the write and return the stored one on read.

nfsd does its I/O through a kiocb, so IOCB_HAS_METADATA and a struct
uio_meta would probably work if the file side takes it from any kiocb..
today only block/fops.c looks at it.  Is your rework headed that way,
or is the prototype tied to io_uring?

The draft's checksum covers a chunk header plus the payload, one per
chunk, so it doesn't line up with a per-block crc yet.  Do you already
know of constraints there? (one tuple per fs block, crc64 for >4k
blocks, alignment?)

Ben

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: support for RT data checksums v2
  2026-12-03 17:11 ` support for RT data checksums v2 Benjamin Coddington
@ 2026-12-04  9:20   ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2026-12-04  9:20 UTC (permalink / raw)
  To: Benjamin Coddington
  Cc: Carlos Maiolino, linux-xfs, linux-fsdevel, Chuck Lever,
	Thomas Haynes, Linux NFS Mailing List

On Thu, Dec 03, 2026 at 12:11:32PM -0500, Benjamin Coddington wrote:
> On 4 Nov 2026, at 3:57, Christoph Hellwig wrote:
> >  - exposing the checksum to userspace through io_uring with
> >    IORING_RW_ATTR_FLAG_PI.  A prototype of this exists, but it needs
> >    a bit more rework of common code than I'd like for the initial
> >    review.
> 
> knfsd could use this too, as a pNFS data server.

Nothing pNFS about this.

> 
> The flexfiles v2 draft (draft-haynes-nfsv4-flexfiles-v2, Tom's on Cc)
> has the client checksum each chunk it writes to a data server, and the
> data server stores that and hands it back on read.  crc32c is one of
> the algorithms.  With rtcsum underneath, nfsd could pass the client's
> crc down with the write and return the stored one on read.

And that part of the draft is insane.  CRCs need to be a based NFS
feature that the a layout can use or even require, but defining them
in the layout doesn't make any sense.  I've voiced that multiple times
in the working group.

> nfsd does its I/O through a kiocb, so IOCB_HAS_METADATA and a struct
> uio_meta would probably work if the file side takes it from any kiocb..
> today only block/fops.c looks at it.  Is your rework headed that way,
> or is the prototype tied to io_uring?

The former.

> The draft's checksum covers a chunk header plus the payload, one per
> chunk, so it doesn't line up with a per-block crc yet.  Do you already
> know of constraints there? (one tuple per fs block, crc64 for >4k
> blocks, alignment?)

The tuple in this case is just check checksum for the pure software
checksums in this series, although I also have plans to support
passing through T10 PI through the file system, in which case you'd
have the "real" PI tuple.  For file system software checksums there
is one crc32c/crc64 per file system block, and your choice of which
one is done at mkfs time based on the protection profile.  For real
PI, the hardware defines the protection interval, which most commonly
is the logical block.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-04  9:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20261104085929.317544-1-hch@lst.de>
2026-12-03 17:11 ` support for RT data checksums v2 Benjamin Coddington
2026-12-04  9:20   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox