* [f2fs-dev] f2fs compression level not actually set when using zstd compression?
@ 2021-07-09 16:52 5kft
2021-07-10 0:20 ` Chao Yu
0 siblings, 1 reply; 2+ messages in thread
From: 5kft @ 2021-07-09 16:52 UTC (permalink / raw)
To: linux-f2fs-devel
It appears that the logic in "set_compress_context" (in https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/tree/fs/f2fs/f2fs.h, line 4021) does not actually set the compression level in the inode for zstd compression - it only sets it for lz4:
if (F2FS_I(inode)->i_compress_algorithm == COMPRESS_LZ4 &&
F2FS_OPTION(sbi).compress_level)
F2FS_I(inode)->i_compress_flag |=
F2FS_OPTION(sbi).compress_level <<
COMPRESS_LEVEL_OFFSET;
Shouldn't this condition include "F2FS_I(inode)->i_compress_algorithm == COMPRESS_ZSTD" as part of the condition as well?
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [f2fs-dev] f2fs compression level not actually set when using zstd compression?
2021-07-09 16:52 [f2fs-dev] f2fs compression level not actually set when using zstd compression? 5kft
@ 2021-07-10 0:20 ` Chao Yu
0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2021-07-10 0:20 UTC (permalink / raw)
To: 5kft, linux-f2fs-devel
Hello,
On 2021/7/10 0:52, 5kft wrote:
> It appears that the logic in "set_compress_context" (in https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/tree/fs/f2fs/f2fs.h, line 4021) does not actually set the compression level in the inode for zstd compression - it only sets it for lz4:
>
> if (F2FS_I(inode)->i_compress_algorithm == COMPRESS_LZ4 &&
> F2FS_OPTION(sbi).compress_level)
> F2FS_I(inode)->i_compress_flag |=
> F2FS_OPTION(sbi).compress_level <<
> COMPRESS_LEVEL_OFFSET;
>
> Shouldn't this condition include "F2FS_I(inode)->i_compress_algorithm == COMPRESS_ZSTD" as part of the condition as well?
You're correct and it's a good catch, I've made a patch to fix this issue.
Thanks a lot for the report!
Thanks,
>
>
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
>
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-10 0:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-09 16:52 [f2fs-dev] f2fs compression level not actually set when using zstd compression? 5kft
2021-07-10 0:20 ` Chao Yu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.