]> git.ipfire.org Git - people/ms/linux.git/commit - fs/buffer.c
fs/buffer.c: support fscrypt in block_read_full_page()
authorEric Biggers <ebiggers@google.com>
Wed, 23 Oct 2019 03:33:11 +0000 (20:33 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 14 Nov 2019 21:40:45 +0000 (16:40 -0500)
commit31fb992ce675ec3326dfd4db9634480391713db8
tree846219c2af7b9939c6ff12399616799602713f72
parent4d06bfb97ecb0df4f5b057a73db002e28c22c35c
fs/buffer.c: support fscrypt in block_read_full_page()

After each filesystem block (as represented by a buffer_head) has been
read from disk by block_read_full_page(), decrypt it if needed.  The
decryption is done on the fscrypt_read_workqueue.

This is the final change needed to support ext4 encryption with
blocksize != PAGE_SIZE, and it's a fairly small change now that
CONFIG_FS_ENCRYPTION is a bool and fs/crypto/ exposes functions to
decrypt individual blocks and to enqueue work on the fscrypt workqueue.

Don't try to add fs-verity support yet, as the fs/verity/ support layer
isn't ready for sub-page blocks yet.  Just add fscrypt support for now.

Almost all the new code is compiled away when CONFIG_FS_ENCRYPTION=n.

Cc: Chandan Rajendra <chandan@linux.ibm.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20191023033312.361355-2-ebiggers@kernel.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/buffer.c