Re: f2fs: add F2FS_IOC_SET_COMPRESS_OPTION_V2 ioctl

From: Yangtao Li
Date: Thu Feb 02 2023 - 04:01:44 EST


> It looks using union may simply the implementation, but readability of new structure
> becomes worse, since this structure will be exposed to user as an uapi interface, I
> guess we'd better to consider more about its readability, thought?

How about use the following structure?

struct f2fs_comp_option_v2 {
__u8 algorithm;
__u8 log_cluster_size;
__u8 compress_level;
};

For the F2FS_IOC_SET_COMPRESS_OPTION_V2 command, algorithm, log_cluster_size
and compress_level can be controlled.

For compress file checksum, let's add a pair of ioctl controls?

Thx,
Yangtao