F2FS With Linux 5.12 To Allow Configuring Compression Level

Written by Michael Larabel in Linux Storage on 12 January 2021 at 03:28 AM EST. 8 Comments
LINUX STORAGE
While the Flash-Friendly File-System (F2FS) allows selecting between your choice of optional compression algorithms like LZO, LZ4, and Zstd -- plus even specifying specific file extensions to optionally limit the transparent file-system compression to -- it doesn't allow easily specifying a compression level. That is fortunately set to change with the Linux 5.12 kernel this spring.

Queued now into the F2FS "dev" tree ahead of the Linux 5.12 merge window is a patch that's been floating around for some weeks to allow easily configuring the compression level. The compress_algorithm mount option is expanded to allow also specifying a level, such that the format supported is [algorithm]:[level] should you want to override any level preference like with the LZ4 and Zstd compression algorithms.

As part of the patch introducing the compress level functionality is also adding LZ4HC compression support for that "high compress" version of LZ4 that retains the same on-disk layout as standard LZ4.

Also queued up as part of the F2FS "dev" code is exposing the real-time superblock status via sysfs for those interested.

These changes and other queuing development work should be part of the Linux 5.12 merge window when it opens up in February while the stable kernel will be out in the spring.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week