F2FS Proposal Adds Support For LZ4HC Compression

Written by Michael Larabel in Linux Storage on 1 December 2020 at 03:00 AM EST. 5 Comments
LINUX STORAGE
The Flash-Friendly File-System (F2FS) already supports LZO, LZ4, and Zstd compression while a proposal would also add support for LZ4HC.

A Huawei engineer sent out the patch adding LZ4HC support to F2FS. LZ4HC is the "high compression" version of LZ4 that improves the compression ratio at slightly lower compression speed. But the higher compression ratio allows for greater storage and maintaining the same decompression speeds as LZ4.

It's quite straight-forward and reuses the existing LZ4HC implementation within the kernel that is already used by the likes of zRAM and Pstore compression. The patch is just a few dozen lines of new code to the F2FS driver.

Early feedback on the patch has suggested reworking the mount option handling. Right now the LZ4HC enabling and specifying of compression level is proposed via a new "compress_lz4hc_clevel" mount option where as it has been suggested to make it cleaner by allowing the compression level be appended to the generic compression algorithm mount option in a similar manner to Btrfs. Huawei's Chao Yu is already working on an updated patch.

It's getting tight to see this potentially in Linux 5.11 but at least it's looking like this additional file-system compression option for F2FS could be coming to the kernel in the near term.
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