fscrypt: support encrypting multiple filesystem blocks per page
authorEric Biggers <ebiggers@google.com>
Mon, 20 May 2019 16:29:44 +0000 (09:29 -0700)
committerEric Biggers <ebiggers@google.com>
Tue, 28 May 2019 17:27:53 +0000 (10:27 -0700)
commit53bc1d854c64c20d967dab15b111baca02a6d99e
tree4e719e9233f31f163b5c67ce727a47d8c3f8c11f
parent03569f2fb8e734f281379767de674e23c38b0b14
fscrypt: support encrypting multiple filesystem blocks per page

Rename fscrypt_encrypt_page() to fscrypt_encrypt_pagecache_blocks() and
redefine its behavior to encrypt all filesystem blocks from the given
region of the given page, rather than assuming that the region consists
of just one filesystem block.  Also remove the 'inode' and 'lblk_num'
parameters, since they can be retrieved from the page as it's already
assumed to be a pagecache page.

This is in preparation for allowing encryption on ext4 filesystems with
blocksize != PAGE_SIZE.

This is based on work by Chandan Rajendra.

Reviewed-by: Chandan Rajendra <chandan@linux.ibm.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
fs/crypto/crypto.c
fs/ext4/page-io.c
fs/f2fs/data.c
include/linux/fscrypt.h