mirror of
https://github.com/facebook/zstd.git
synced 2025-12-05 00:03:19 -05:00
Linux Kernel Patch
There are two pieces, the zstd_compress and zstd_decompress kernel modules, and the BtrFS patch.
The patches are based off of the linux kernel version 4.9.
The BtrFS patch is not present in its entirety yet.
Zstd Kernel modules
- The header is in
include/linux/zstd.h. - It is split up into
zstd_compressandzstd_decompress, which can be loaded independently. - Source files are in
lib/zstd/. lib/Kconfigandlib/Makefileneed to be modified by applyinglib/Kconfig.diffandlib/Makefile.diffrespectively.test/UserlandTest.cppcontains tests for the patch in userland by mocking the kernel headers. It can be run with the following commands:cd test make googletest make UserlandTest ./UserlandTest
BtrFS
fs/btrfs/zstd.cis provided.- Some more glue is required to integrate it with BtrFS, but I haven't included the patches yet.
In the meantime see
1914f7d4caif you're interested.