[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260120173449.GT15551@frogsfrogsfrogs>
Date: Tue, 20 Jan 2026 09:34:49 -0800
From: "Darrick J. Wong" <djwong@...nel.org>
To: Andrey Albershteyn <aalbersh@...hat.com>
Cc: Christoph Hellwig <hch@....de>, Eric Biggers <ebiggers@...nel.org>,
Matthew Wilcox <willy@...radead.org>, fsverity@...ts.linux.dev,
linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
aalbersh@...nel.org, david@...morbit.com, tytso@....edu,
linux-ext4@...r.kernel.org, jaegeuk@...nel.org, chao@...nel.org,
linux-f2fs-devel@...ts.sourceforge.net
Subject: Re: fsverity metadata offset, was: Re: [PATCH v2 0/23] fs-verity
support for XFS with post EOF merkle tree
On Tue, Jan 20, 2026 at 12:44:19PM +0100, Andrey Albershteyn wrote:
> On 2026-01-20 08:32:18, Christoph Hellwig wrote:
> > On Mon, Jan 19, 2026 at 11:58:16AM -0800, Darrick J. Wong wrote:
> > > > > a) not all architectures are reasonable. As Darrick pointed out
> > > > > hexagon seems to support page size up to 1MiB. While I don't know
> > > > > if they exist in real life, powerpc supports up to 256kiB pages,
> > > > > and I know they are used for real in various embedded settings
> > >
> > > They *did* way back in the day, I worked with some seekrit PPC440s early
> > > in my career. I don't know that any of them still exist, but the code
> > > is still there...
> >
> > Sorry, I meant I don't really know how real the hexagon large page
> > sizes are. I know about the ppcs one personally, too.
> >
> > > > If we do need to fix this, there are a couple things we could consider
> > > > doing without changing the on-disk format in ext4 or f2fs: putting the
> > > > data in the page cache at a different offset than it exists on-disk, or
> > > > using "small" pages for EOF specifically.
> > >
> > > I'd leave the ondisk offset as-is, but change the pagecache offset to
> > > roundup(i_size_read(), mapping_max_folio_size_supported()) just to keep
> > > file data and fsverity metadata completely separate.
> >
> > Can we find a way to do that in common code and make ext4 and f2fs do
> > the same?
>
> hmm I don't see what else we could do except providing common offset
> and then use it to map blocks
>
> loff_t fsverity_metadata_offset(struct inode *inode)
> {
> return roundup(i_size_read(), mapping_max_folio_size_supported());
> }
Yeah, that's probably the best we can do. Please add a comment to that
helper to state explicitly that this is the *incore* file offset of the
merkle tree if the filesystem decides to cache it in the pagecache.
--D
> --
> - Andrey
>
>
Powered by blists - more mailing lists