summaryrefslogtreecommitdiff
path: root/include/uapi/linux/f2fs.h
diff options
context:
space:
mode:
authorDaeho Jeong <daehojeong@google.com>2020-10-30 07:10:35 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2020-12-03 08:59:38 +0300
commite1e8debec6564d0c355aab84c93de8e357f397bd (patch)
tree0e3b14248fb788eec5a19f8afffc1c2d48ca7480 /include/uapi/linux/f2fs.h
parent9e2a5f8cfb4d9371783e21e27bba4338401f1260 (diff)
downloadlinux-e1e8debec6564d0c355aab84c93de8e357f397bd.tar.xz
f2fs: add F2FS_IOC_SET_COMPRESS_OPTION ioctl
Added a new F2FS_IOC_SET_COMPRESS_OPTION ioctl to change 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; option.algorithm = 1; option.log_cluster_size = 7; ioctl(fd, F2FS_IOC_SET_COMPRESS_OPTION, &option); Signed-off-by: Daeho Jeong <daehojeong@google.com> [Chao Yu: remove f2fs_is_compress_algorithm_valid()] Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/uapi/linux/f2fs.h')
-rw-r--r--include/uapi/linux/f2fs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/f2fs.h b/include/uapi/linux/f2fs.h
index 872e61d78f29..f00199a2e38b 100644
--- a/include/uapi/linux/f2fs.h
+++ b/include/uapi/linux/f2fs.h
@@ -38,6 +38,8 @@
struct f2fs_sectrim_range)
#define F2FS_IOC_GET_COMPRESS_OPTION _IOR(F2FS_IOCTL_MAGIC, 21, \
struct f2fs_comp_option)
+#define F2FS_IOC_SET_COMPRESS_OPTION _IOW(F2FS_IOCTL_MAGIC, 22, \
+ struct f2fs_comp_option)
/*
* should be same as XFS_IOC_GOINGDOWN.