[f2fs-dev] [GIT PULL] fsverity updates for 7.0

Eric Biggers via Linux-f2fs-devel
2026-02-12T01:28:00Z

The following changes since commit 63804fed149a6750ffd28610c5c1c98cce6bd377:

Linux 6.19-rc7 (2026-01-25 14:11:24 -0800)

are available in the Git repository at:

git://git.kernel.org/pub/scm/fs/fsverity/linux.git tags/fsverity-for-linus

for you to fetch changes up to 433fbcac9ebe491b518b21c7305fba9a748c7d2c:

fsverity: remove inode from fsverity_verification_ctx (2026-02-04 11:31:54 -0800)

----------------------------------------------------------------

fsverity cleanups, speedup, and memory usage optimization from
Christoph Hellwig:

- Move some logic into common code

- Fix btrfs to reject truncates of fsverity files

- Improve the Merkle tree readahead implementation

- Store each inode's fsverity_info in a hash table instead of using a
pointer in the filesystem-specific part of the inode.

This optimizes for memory usage in the usual case where most files
don't have fsverity enabled.

- Look up the fsverity_info fewer times during verification, to
amortize the hash table overhead

----------------------------------------------------------------
Christoph Hellwig (17):
fs,fsverity: reject size changes on fsverity files in setattr_prepare
fs,fsverity: clear out fsverity_info from common code
ext4: don't build the fsverity work handler for !CONFIG_FS_VERITY
f2fs: don't build the fsverity work handler for !CONFIG_FS_VERITY
fsverity: pass struct file to ->write_merkle_tree_block
fsverity: start consolidating pagecache code
fsverity: don't issue readahead for non-ENOENT errors from __filemap_get_folio
readahead: push invalidate_lock out of page_cache_ra_unbounded
ext4: move ->read_folio and ->readahead to readpage.c
fsverity: kick off hash readahead at data I/O submission time
fsverity: deconstify the inode pointer in struct fsverity_info
fsverity: push out fsverity_info lookup
fs: consolidate fsverity_info lookup in buffer.c
ext4: consolidate fsverity_info lookup
f2fs: consolidate fsverity_info lookup
btrfs: consolidate fsverity_info lookup
fsverity: use a hashtable to find the fsverity_info

Eric Biggers (1):
fsverity: remove inode from fsverity_verification_ctx

fs/attr.c | 12 ++-
fs/btrfs/btrfs_inode.h | 4 -
fs/btrfs/extent_io.c | 53 +++++++-----
fs/btrfs/inode.c | 13 +--
fs/btrfs/verity.c | 11 +--
fs/buffer.c | 25 +++---
fs/ext4/ext4.h | 8 +-
fs/ext4/inode.c | 31 -------
fs/ext4/readpage.c | 64 +++++++++++----
fs/ext4/super.c | 4 -
fs/ext4/verity.c | 34 +++-----
fs/f2fs/compress.c | 7 +-
fs/f2fs/data.c | 100 ++++++++++++++---------
fs/f2fs/f2fs.h | 12 +--
fs/f2fs/file.c | 6 +-
fs/f2fs/inode.c | 1 -
fs/f2fs/super.c | 3 -
fs/f2fs/verity.c | 34 +++-----
fs/inode.c | 9 ++
fs/verity/Makefile | 1 +
fs/verity/enable.c | 41 ++++++----
fs/verity/fsverity_private.h | 20 +++--
fs/verity/open.c | 84 +++++++++++--------
fs/verity/pagecache.c | 58 +++++++++++++
fs/verity/read_metadata.c | 19 +++--
fs/verity/verify.c | 91 +++++++++++++--------
include/linux/fsverity.h | 190 +++++++++++++++++--------------------------
mm/readahead.c | 15 ++--
28 files changed, 516 insertions(+), 434 deletions(-)
create mode 100644 fs/verity/pagecache.c