summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/f2fs.h
diff options
context:
space:
mode:
authorSheng Yong <shengyong1@huawei.com>2018-03-15 18:51:42 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2018-03-17 14:02:57 +0900
commitff62af200b94e06b1430eac6e58f5f26d13c749d (patch)
tree23f4285339aa68a38749106c87c37002dccd69f8 /fs/f2fs/f2fs.h
parentb7c409deda6bcaaa6452b015937a013dd8b481b4 (diff)
downloadlinux-ff62af200b94e06b1430eac6e58f5f26d13c749d.tar.bz2
f2fs: introduce a new mount option test_dummy_encryption
This patch introduces a new mount option `test_dummy_encryption' to allow fscrypt to create a fake fscrypt context. This is used by xfstests. Signed-off-by: Sheng Yong <shengyong1@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r--fs/f2fs/f2fs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index c0d74ff9a6d7..191ee5718369 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -133,6 +133,7 @@ struct f2fs_mount_info {
int whint_mode;
int alloc_mode; /* segment allocation policy */
int fsync_mode; /* fsync policy */
+ bool test_dummy_encryption; /* test dummy encryption */
};
#define F2FS_FEATURE_ENCRYPT 0x0001
@@ -1077,6 +1078,13 @@ enum fsync_mode {
FSYNC_MODE_STRICT, /* fsync behaves in line with ext4 */
};
+#ifdef CONFIG_F2FS_FS_ENCRYPTION
+#define DUMMY_ENCRYPTION_ENABLED(sbi) \
+ (unlikely(F2FS_OPTION(sbi).test_dummy_encryption))
+#else
+#define DUMMY_ENCRYPTION_ENABLED(sbi) (0)
+#endif
+
struct f2fs_sb_info {
struct super_block *sb; /* pointer to VFS super block */
struct proc_dir_entry *s_proc; /* proc entry */