From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=213.95.11.211 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796376047; b=uyvBLz7CrCgbiA4Jz4lpHD6UWYzmq9xR+VdmUpL0ollzgWvVp9RizZDbOZbVOmJjhZvz vEoOzmDD80wSoP4lO8MWND60ssJguTfK0FA5SfbHA+UF4iwK7R2+1ySYBriNRrCqAvxI+ PWyblp5s+CKFhp04xS7T2nhBOcjEoJPVKj5fQVjHSjvBevkgC4dQ7NDu6c7m8Sgwd4GBL w3UIfZQTOKOCa+NxhnOakqSMvEUoXJGQawWxR4GW6p2AQWcloM4Ds83Je1BWMcu2JhScR GTaaUiSFurVujLv6Hi9qmH4If5CbNmUAigy9GKhk1D+HkXlavGSbPl0pyZLQFDNho+g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796376047; h=DMARC-Filter:Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent; bh=N/rXhqKpHPlIOnfLfXuLU44xHpVfpTNpdZEi2/L96Eo=; b=iJc3kau0m9EkNp10r9wyLjPvUiio18zhKPLEA8FaZ8Ntpd28p/nEpY9XfKI2i03rxjC1 LrHEvn6ctQiVgLWKpT0EVWDp+bpaFH8RpSwMWf4WbkG1UB+QLKGNQjvNTyQ3MPOTJd5L/ G38rrl+D6hYqhI7+xgjfjL4HsmCvZgh0w25z4TGs7gkT/KDvO6iXq944xFIXLUxMfnclY z2rrcgFGh6X3oUkHpEd8SpuBkN63KlBZopjZ4zezD4PFGtj5ZAN5VPYvgR0Mnv+boUxOi Tn5TgmDL02SG24YcrPqclcFnO0VP6D4T8tc4IkdiFLiXudx6747dQHaytMTCjJ7yOVg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.remote-ip=213.95.11.211 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1AE3D606A32C; Fri, 4 Dec 2026 09:20:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1AE3D606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id EF4EF68B05; Fri, 4 Dec 2026 10:20:42 +0100 (CET) Date: Fri, 4 Dec 2026 10:20:42 +0100 From: Christoph Hellwig To: Benjamin Coddington Cc: Carlos Maiolino , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, Chuck Lever , Thomas Haynes , Linux NFS Mailing List Subject: Re: support for RT data checksums v2 Message-ID: <20261204092042.GA21446@lst.de> References: <20261104085929.317544-1-hch@lst.de> <049F10AB-3AA6-4EE7-B521-A773456C94B8@hammerspace.com> X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <049F10AB-3AA6-4EE7-B521-A773456C94B8@hammerspace.com> User-Agent: Mutt/1.5.17 (2007-11-01) 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.