fs/buffer.c: support fsverity in block_read_full_folio()
authorEric Biggers <ebiggers@google.com>
Fri, 23 Dec 2022 20:36:37 +0000 (12:36 -0800)
committerEric Biggers <ebiggers@google.com>
Tue, 10 Jan 2023 03:06:09 +0000 (19:06 -0800)
commit4fa512ce70515ac0d59e30a4b7ae0888b117d8a2
treeb82c27984d1aad27209f8380cd9ce0dccb45dd58
parentfeb0576a361aacaf12c49e66d32e293a0f3a2e64
fs/buffer.c: support fsverity in block_read_full_folio()

After each filesystem block (as represented by a buffer_head) has been
read from disk by block_read_full_folio(), verify it if needed.  The
verification is done on the fsverity_read_workqueue.  Also allow reads
of verity metadata past i_size, as required by ext4.

This is needed to support fsverity on ext4 filesystems where the
filesystem block size is less than the page size.

The new code is compiled away when CONFIG_FS_VERITY=n.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Tested-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Link: https://lore.kernel.org/r/20221223203638.41293-11-ebiggers@kernel.org
fs/buffer.c