History

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);

Daeho Jeong committed 6 years ago

Commit e1e8deb1 parent 9e2a5f82 files · +56 −0Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/f2fs.h+2−0
@@ -38,6 +38,8 @@ · 37 unmodified lines
38 struct f2fs_sectrim_range)38 struct f2fs_sectrim_range)
39#define F2FS_IOC_GET_COMPRESS_OPTION _IOR(F2FS_IOCTL_MAGIC, 21, \39#define F2FS_IOC_GET_COMPRESS_OPTION _IOR(F2FS_IOCTL_MAGIC, 21, \
40 struct f2fs_comp_option)40 struct f2fs_comp_option)
41#define F2FS_IOC_SET_COMPRESS_OPTION _IOW(F2FS_IOCTL_MAGIC, 22, \
42 struct f2fs_comp_option)
41 43
42/*44/*
43 * should be same as XFS_IOC_GOINGDOWN.45 * should be same as XFS_IOC_GOINGDOWN.