Re: [f2fs-dev] [PATCH v3 2/3] f2fs-tools:sload.f2fs compression support

From: Chao Yu
Date: Thu Dec 10 2020 - 03:43:37 EST


On 2020/12/8 16:15, Robin Hsu wrote:
From: Robin Hsu <robinhsu@xxxxxxxxxx>

Add F2FS compression support for sload
* Support file extension filter, either default-accept or default-deny
policy
* Support choice of compression algorithm, LZO (version 2) or LZ4
(default)
* Support custom log of cluster size
* Support minimum number of compressed blocks per cluster (default 1).
A cluster will not be compressed if the number can not be met.
* suuport -r (read-only) option

Could you please update manual as well?

+
+ /* sldc: sload compression support */

Personally, I don't like the naming method of adding "sldc_" prefix... :(

+ bool sldc_en;
+ bool sldc_use_allow_list; /* default false to use the deny list */
+ struct compress_ctx sldc_cc;
+ u8 sldc_ca; /* compress algorithm: 0 = LZO, 1 = LZ4 */
+ compress_ops *sldc_compr;
+ enum filter_policy sldc_policy;
+ /* max_cppc can used to specify minimum compression rate */
+ unsigned int sldc_min_cbpc; /* min compressed pages per cluster */
+ bool sldc_got_opt;
+ bool sldc_immutable;
+ struct ext_tbl_op *sldc_ef; /* extension filter */

The variables name like sldc_en, sldc_ca, min_cbpc, sldc_ef makes developers
hard to understand w/o comments, and also there is no comments for several
variable like sldc_en, sldc_cc...

Could you please improve the naming like f2fs-tools style?

Thanks,