linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Eric Biggers <ebiggers@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-fscrypt@vger.kernel.org, fsverity@lists.linux.dev,
	linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-mtd@lists.infradead.org, linux-btrfs@vger.kernel.org,
	ceph-devel@vger.kernel.org,
	Christian Brauner <brauner@kernel.org>
Subject: Re: [PATCH v5 00/13] Move fscrypt and fsverity info out of struct inode
Date: Sun, 10 Aug 2025 10:14:14 -0700	[thread overview]
Message-ID: <aJjTZg-VOaZ_2k2H@infradead.org> (raw)
In-Reply-To: <20250810170311.GA16624@sol>

On Sun, Aug 10, 2025 at 10:03:11AM -0700, Eric Biggers wrote:
> I assume you actually still mean fsverity, not fscrypt.

Yes, sorry.

> First, it would
> be helpful not to use one solution for fscrypt and a totally different
> solution for fsverity, as that would increase the maintenance cost well
> beyond that of either solution individually.

I agree that reducing the number of infrastructures is a goal.  But I
don't think we should limit us to a single "solution" for different
kinds of problems.

> 
> Second, the fsverity info can be loaded very frequently.  For example,
> curently it's loaded for each 4K data block processed.

Well, we can easily keep a once looked up data structure around for
any operation that does not leave file system control.  So for writing
that's a single ioctl context.  For read that is a single call into
->readahead, or maybe even ->read_iter.

> Also, there
> *are* use cases in which most files on the filesystem have fsverity
> enabled.  Not super common, but they exist.

Sure.  But the typical use case is a few files, and even that is just
a tiny minority of all ext4/f2fs/xfs file systems.

> It doesn't really seem like the kind of solution that's a good choice
> for a frequently-loaded field.  And that's only the load; it's not
> getting into the insertion (and resizing) part.

Assuming you actually get it down to once per high-level operation
above, it will still be absolute noise compared to the I/O generated.

> If we're going so far as to use a rhashtable, I have to wonder why we
> aren't first prioritizing other fields.  For example ext4_inode_info
> unconditionally has 40 bytes for fast_commit information, even though
> fast_commit is an experimental ext4 feature that isn't enabled on most
> filesystems.  That's 5 times as much as i_verity_info.  And quota has 24
> bytes under CONFIG_QUOTA.  And there are even holes in the
> ext4_inode_info struct; we could also just improve the field packing!

All that does sound like a good idea, independent of what we are
discussing here.


  reply	other threads:[~2025-08-10 17:14 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-10  7:56 [PATCH v5 00/13] Move fscrypt and fsverity info out of struct inode Eric Biggers
2025-08-10  7:56 ` [PATCH v5 01/13] fscrypt: replace raw loads of info pointer with helper function Eric Biggers
2025-08-10  7:56 ` [PATCH v5 02/13] fscrypt: add support for info in fs-specific part of inode Eric Biggers
2025-08-10  7:56 ` [PATCH v5 03/13] ext4: move crypt info pointer to " Eric Biggers
2025-08-11 11:13   ` Theodore Ts'o
2025-08-10  7:56 ` [PATCH v5 04/13] f2fs: " Eric Biggers
2025-08-10  7:56 ` [PATCH v5 05/13] ubifs: " Eric Biggers
2025-08-10  7:56 ` [PATCH v5 06/13] ceph: " Eric Biggers
2025-08-10  7:57 ` [PATCH v5 07/13] fs: remove inode::i_crypt_info Eric Biggers
2025-08-10  7:57 ` [PATCH v5 08/13] fsverity: add support for info in fs-specific part of inode Eric Biggers
2025-08-10  7:57 ` [PATCH v5 09/13] ext4: move verity info pointer to " Eric Biggers
2025-08-11 11:13   ` Theodore Ts'o
2025-08-10  7:57 ` [PATCH v5 10/13] f2fs: " Eric Biggers
2025-08-10  7:57 ` [PATCH v5 11/13] btrfs: " Eric Biggers
2025-08-10  7:57 ` [PATCH v5 12/13] fs: remove inode::i_verity_info Eric Biggers
2025-08-10  7:57 ` [PATCH v5 13/13] fsverity: check IS_VERITY() in fsverity_cleanup_inode() Eric Biggers
2025-08-10  8:47 ` [PATCH v5 00/13] Move fscrypt and fsverity info out of struct inode Christian Brauner
2025-08-10  9:03   ` Eric Biggers
2025-08-11 13:17     ` Christian Brauner
2025-08-11 13:34       ` Christian Brauner
2025-08-11 16:39         ` Eric Biggers
2025-08-15 14:28           ` Christian Brauner
2025-08-10 14:49 ` Christoph Hellwig
2025-08-10 17:03   ` Eric Biggers
2025-08-10 17:14     ` Christoph Hellwig [this message]
2025-08-11 13:35     ` Christian Brauner

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=aJjTZg-VOaZ_2k2H@infradead.org \
    --to=hch@infradead.org \
    --cc=brauner@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=ebiggers@kernel.org \
    --cc=fsverity@lists.linux.dev \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fscrypt@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).