mirror of
https://github.com/facebook/zstd.git
synced 2024-11-24 06:56:44 +08:00
.. | ||
fs/btrfs | ||
include/linux | ||
lib | ||
test | ||
.gitignore | ||
README.md | ||
spaces_to_tabs.sh |
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_compress
andzstd_decompress
, which can be loaded independently. - Source files are in
lib/zstd/
. lib/Kconfig
andlib/Makefile
need to be modified by applyinglib/Kconfig.diff
andlib/Makefile.diff
respectively.test/UserlandTest.cpp
contains 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.c
is provided.- Some more glue is required to integrate it with BtrFS, but I haven't included the patches yet.
In the meantime see
1914f7d4ca
if you're interested.