summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/f2fs.h
diff options
context:
space:
mode:
authorDaeho Jeong <daehojeong@google.com>2020-10-30 13:10:34 +0900
committerJaegeuk Kim <jaegeuk@kernel.org>2020-11-02 17:34:00 -0800
commit9e2a5f8cfb4d9371783e21e27bba4338401f1260 (patch)
tree269020f8682cd2626b966be54623b4bb9a72466f /include/uapi/linux/f2fs.h
parentfa4320cefb8537a70cc28c55d311a1f569697cd3 (diff)
f2fs: add F2FS_IOC_GET_COMPRESS_OPTION ioctl
Added a new F2FS_IOC_GET_COMPRESS_OPTION ioctl to get file compression option of a file. struct f2fs_comp_option { u8 algorithm; => compression algorithm => 0:lzo, 1:lz4, 2:zstd, 3:lzorle u8 log_cluster_size; => log scale cluster size => 2 ~ 8 }; struct f2fs_comp_option option; ioctl(fd, F2FS_IOC_GET_COMPRESS_OPTION, &option); Signed-off-by: Daeho Jeong <daehojeong@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/uapi/linux/f2fs.h')
-rw-r--r--include/uapi/linux/f2fs.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/uapi/linux/f2fs.h b/include/uapi/linux/f2fs.h
index 28bcfe8d2c27..872e61d78f29 100644
--- a/include/uapi/linux/f2fs.h
+++ b/include/uapi/linux/f2fs.h
@@ -36,6 +36,8 @@
_IOR(F2FS_IOCTL_MAGIC, 19, __u64)
#define F2FS_IOC_SEC_TRIM_FILE _IOW(F2FS_IOCTL_MAGIC, 20, \
struct f2fs_sectrim_range)
+#define F2FS_IOC_GET_COMPRESS_OPTION _IOR(F2FS_IOCTL_MAGIC, 21, \
+ struct f2fs_comp_option)
/*
* should be same as XFS_IOC_GOINGDOWN.
@@ -84,4 +86,9 @@ struct f2fs_sectrim_range {
__u64 flags;
};
+struct f2fs_comp_option {
+ __u8 algorithm;
+ __u8 log_cluster_size;
+};
+
#endif /* _UAPI_LINUX_F2FS_H */