summaryrefslogtreecommitdiff
path: root/include/linux/fscrypto.h
diff options
context:
space:
mode:
authorDavid Gstir <david@sigma-star.at>2016-11-13 22:20:44 +0100
committerTheodore Ts'o <tytso@mit.edu>2016-11-13 18:47:04 -0500
commit1c7dcf69eea3224474fe884a03b3e19b82d1101e (patch)
treeb2d64ef7305d32d4da2fc45946a980ee85a212cc /include/linux/fscrypto.h
parentbc33b0ca11e3df467777a4fa7639ba488c9d4911 (diff)
fscrypt: Add in-place encryption mode
ext4 and f2fs require a bounce page when encrypting pages. However, not all filesystems will need that (eg. UBIFS). This is handled via a flag on fscrypt_operations where a fs implementation can select in-place encryption over using a bounce page (which is the default). Signed-off-by: David Gstir <david@sigma-star.at> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'include/linux/fscrypto.h')
-rw-r--r--include/linux/fscrypto.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/fscrypto.h b/include/linux/fscrypto.h
index ff8b11b26f31..5a65b0e3773f 100644
--- a/include/linux/fscrypto.h
+++ b/include/linux/fscrypto.h
@@ -154,9 +154,15 @@ struct fscrypt_name {
#define fname_len(p) ((p)->disk_name.len)
/*
+ * fscrypt superblock flags
+ */
+#define FS_CFLG_INPLACE_ENCRYPTION (1U << 1)
+
+/*
* crypto opertions for filesystems
*/
struct fscrypt_operations {
+ unsigned int flags;
int (*get_context)(struct inode *, void *, size_t);
int (*key_prefix)(struct inode *, u8 **);
int (*prepare_context)(struct inode *);