]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Feb 2026 18:41:34 +0000 (10:41 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Feb 2026 18:41:34 +0000 (10:41 -0800)
Pull fsverity updates from Eric Biggers:
 "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 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"

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

13 files changed:
1  2 
fs/btrfs/extent_io.c
fs/btrfs/inode.c
fs/btrfs/verity.c
fs/buffer.c
fs/ext4/ext4.h
fs/ext4/inode.c
fs/ext4/readpage.c
fs/ext4/super.c
fs/ext4/verity.c
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/inode.c

index 3df399dc88567b1bc41cdcca5b812336ecb442d3,24988520521ccb67568de6415ba01ea74e15e35d..744a1fff6eefc17f19c6644e45e035e99ff35a19
@@@ -1038,19 -1039,12 +1044,19 @@@ static int btrfs_do_readpage(struct fol
                        break;
                }
                if (btrfs_folio_test_uptodate(fs_info, folio, cur, blocksize)) {
-                       end_folio_read(folio, true, cur, blocksize);
+                       end_folio_read(vi, folio, true, cur, blocksize);
                        continue;
                }
 -              em = get_extent_map(BTRFS_I(inode), folio, cur, end - cur + 1, em_cached);
 +              /*
 +               * Search extent map for the whole locked range.
 +               * This will allow btrfs_get_extent() to return a larger hole
 +               * when possible.
 +               * This can reduce duplicated btrfs_get_extent() calls for large
 +               * holes.
 +               */
 +              em = get_extent_map(BTRFS_I(inode), folio, cur, locked_end - cur + 1, em_cached);
                if (IS_ERR(em)) {
-                       end_folio_read(folio, false, cur, end + 1 - cur);
+                       end_folio_read(vi, folio, false, cur, end + 1 - cur);
                        return PTR_ERR(em);
                }
                extent_offset = cur - em->start;
Simple merge
Simple merge
diff --cc fs/buffer.c
Simple merge
diff --cc fs/ext4/ext4.h
Simple merge
diff --cc fs/ext4/inode.c
Simple merge
Simple merge
diff --cc fs/ext4/super.c
Simple merge
Simple merge
diff --cc fs/f2fs/data.c
Simple merge
diff --cc fs/f2fs/f2fs.h
Simple merge
diff --cc fs/f2fs/file.c
Simple merge
diff --cc fs/inode.c
Simple merge