Re: [PATCH v4] f2fs: fix to enable compress for newly created file if extension matches

From: Chao Yu
Date: Wed Nov 23 2022 - 21:38:32 EST


On 2022/11/24 5:29, Jaegeuk Kim wrote:
+ if (S_ISDIR(inode->i_mode))
+ goto inherit_comp;

Documentation/filesystems/f2fs.rst

- Priority in between FS_COMPR_FL, FS_NOCOMP_FS, extensions:

* compress_extension=so; nocompress_extension=zip; chattr +c dir; touch
dir/foo.so; touch dir/bar.zip; touch dir/baz.txt; then foo.so and baz.txt
should be compresse, bar.zip should be non-compressed. chattr +c dir/bar.zip
can enable compress on bar.zip.

It looks nocompress_extension has higher priority than flag inheriting?

I think so.

Hi Sheng, Jaegeuk,

Yup, I guess I misunderstand the code. :)

Thanks,