linux/fs/crypto
Eric Biggers 53dd3f802a fscrypt: change fscrypt_dio_supported() to prepare for STATX_DIOALIGN
To prepare for STATX_DIOALIGN support, make two changes to
fscrypt_dio_supported().

First, remove the filesystem-block-alignment check and make the
filesystems handle it instead.  It previously made sense to have it in
fs/crypto/; however, to support STATX_DIOALIGN the alignment restriction
would have to be returned to filesystems.  It ends up being simpler if
filesystems handle this part themselves, especially for f2fs which only
allows fs-block-aligned DIO in the first place.

Second, make fscrypt_dio_supported() work on inodes whose encryption key
hasn't been set up yet, by making it set up the key if needed.  This is
required for statx(), since statx() doesn't require a file descriptor.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20220827065851.135710-4-ebiggers@kernel.org
2022-09-11 19:47:12 -05:00
..
bio.c block: pass a block_device and opf to bio_reset 2022-02-02 07:50:00 -07:00
crypto.c fscrypt: split up FS_CRYPTO_BLOCK_SIZE 2022-04-13 15:03:09 -07:00
fname.c fscrypt: export fscrypt_fname_encrypt and fscrypt_fname_encrypted_size 2022-08-03 00:54:11 +02:00
fscrypt_private.h We have a good pile of various fixes and cleanups from Xiubo, Jeff, 2022-08-11 12:41:07 -07:00
hkdf.c fscrypt: allow 256-bit master keys with AES-256-XTS 2021-09-22 11:29:38 -07:00
hooks.c fscrypt: export fscrypt_fname_encrypt and fscrypt_fname_encrypted_size 2022-08-03 00:54:11 +02:00
inline_crypt.c fscrypt: change fscrypt_dio_supported() to prepare for STATX_DIOALIGN 2022-09-11 19:47:12 -05:00
Kconfig fscrypt: relax Kconfig dependencies for crypto API algorithms 2021-04-22 17:31:32 +10:00
keyring.c fscrypt: add new helper functions for test_dummy_encryption 2022-05-09 16:18:54 -07:00
keysetup_v1.c fscrypt: stop pretending that key setup is nofs-safe 2020-09-22 06:48:42 -07:00
keysetup.c fscrypt: Add HCTR2 support for filename encryption 2022-06-10 16:40:18 +08:00
Makefile fscrypt: add inline encryption support 2020-07-08 10:29:30 -07:00
policy.c We have a good pile of various fixes and cleanups from Xiubo, Jeff, 2022-08-11 12:41:07 -07:00