]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fsverity: kick off hash readahead at data I/O submission time
authorChristoph Hellwig <hch@lst.de>
Mon, 2 Feb 2026 06:06:33 +0000 (07:06 +0100)
committerEric Biggers <ebiggers@kernel.org>
Tue, 3 Feb 2026 01:15:26 +0000 (17:15 -0800)
commitf1a6cf44b344b1ac2cefb387779e3002be237a7e
treed5a8639f50d557be2c241d6e7f227213b44cf301
parent314b652b7e7ad335fa20b693c8878a4850dae098
fsverity: kick off hash readahead at data I/O submission time

Currently all reads of the fsverity hashes are kicked off from the data
I/O completion handler, leading to needlessly dependent I/O.  This is
worked around a bit by performing readahead on the level 0 nodes, but
still fairly ineffective.

Switch to a model where the ->read_folio and ->readahead methods instead
kick off explicit readahead of the fsverity hashed so they are usually
available at I/O completion time.

For 64k sequential reads on my test VM this improves read performance
from 2.4GB/s - 2.6GB/s to 3.5GB/s - 3.9GB/s.  The improvements for
random reads are likely to be even bigger.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: David Sterba <dsterba@suse.com> # btrfs
Link: https://lore.kernel.org/r/20260202060754.270269-5-hch@lst.de
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
fs/btrfs/verity.c
fs/ext4/readpage.c
fs/ext4/verity.c
fs/f2fs/data.c
fs/f2fs/verity.c
fs/verity/pagecache.c
fs/verity/read_metadata.c
fs/verity/verify.c
include/linux/fsverity.h