diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fscrypt.h | 12 | ||||
-rw-r--r-- | include/uapi/linux/fscrypt.h | 3 |
2 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h index 09a3cacbf62a..b559e6f77707 100644 --- a/include/linux/fscrypt.h +++ b/include/linux/fscrypt.h @@ -86,6 +86,18 @@ struct fscrypt_operations { unsigned int has_32bit_inodes : 1; /* + * If set, then fs/crypto/ will allow users to select a crypto data unit + * size that is less than the filesystem block size. This is done via + * the log2_data_unit_size field of the fscrypt policy. This flag is + * not compatible with filesystems that encrypt variable-length blocks + * (i.e. blocks that aren't all equal to filesystem's block size), for + * example as a result of compression. It's also not compatible with + * the fscrypt_encrypt_block_inplace() and + * fscrypt_decrypt_block_inplace() functions. + */ + unsigned int supports_subblock_data_units : 1; + + /* * This field exists only for backwards compatibility reasons and should * only be set by the filesystems that are setting it already. It * contains the filesystem-specific key description prefix that is diff --git a/include/uapi/linux/fscrypt.h b/include/uapi/linux/fscrypt.h index fd1fb0d5389d..7a8f4c290187 100644 --- a/include/uapi/linux/fscrypt.h +++ b/include/uapi/linux/fscrypt.h @@ -71,7 +71,8 @@ struct fscrypt_policy_v2 { __u8 contents_encryption_mode; __u8 filenames_encryption_mode; __u8 flags; - __u8 __reserved[4]; + __u8 log2_data_unit_size; + __u8 __reserved[3]; __u8 master_key_identifier[FSCRYPT_KEY_IDENTIFIER_SIZE]; }; |