1- # ZSTD -On-ZFS Library Manual
1+ # Zstd -On-ZFS Library Manual
22
33## Introduction
44
5- This subtree contains the ZSTD library used in ZFS. It is heavily cut-down by
5+ This subtree contains the Zstd library used in ZFS. It is heavily cut-down by
66dropping any unneeded files, and combined into a single file, but otherwise is
77intentionally unmodified. Please do not alter the file containing the zstd
8- library, besides upgrading to a newer ZSTD release.
8+ library, besides upgrading to a newer Zstd release.
99
1010Tree structure:
1111
@@ -14,25 +14,41 @@ Tree structure:
1414* ` zstd-in.c ` is our template file for generating the single-file library
1515* ` include/ ` : This directory contains supplemental includes for platform
1616 compatibility, which are not expected to be used by ZFS elsewhere in the
17- future. Thus we keep them private to ZSTD .
17+ future. Thus we keep them private to Zstd .
1818
19- ## Updating ZSTD
19+ ## Zstd update policy
2020
21- To update ZSTD the following steps need to be taken:
21+ Since the exact compressed byte stream may change between Zstd versions, updates
22+ should follow this policy:
2223
23- 1 . Grab the latest release of [ ZSTD] ( https://github.com/facebook/zstd/releases ) .
24+ 1 . Zstd may be updated, as needed, after a new .0 release is tagged.
25+ 2 . Critical patches may be applied up until the next release freeze,
26+ _ potentially_ even updating to a newer upstream version.
27+ 3 . The Zstd version will not be upgraded within a major release.
28+ 4 . Multiple Zstd versions are not supported concurrently within a release.
29+ 5 . Release notes should highlight Zstd updates and any expected impact (e.g.
30+ changes in compression ratio/performance, and differences in compressed byte
31+ streams which may affect deduplication or NOP writes).
32+
33+ ## Updating Zstd
34+
35+ To update Zstd the following steps need to be taken:
36+
37+ 1 . Grab the latest release of [ Zstd] ( https://github.com/facebook/zstd/releases ) .
24382 . Copy the files output by the following script to ` module/zstd/lib/ ` :
25- ` grep include [path to zstd]/contrib/single_file_libs/zstd-in.c | awk '{ print $2 }' `
39+ ```
40+ grep include [path to zstd]/build/single_file_libs/zstd-in.c | awk '{ print $2 }'
41+ ```
26423 . Remove debug.c, threading.c, and zstdmt_compress.c.
27434 . Update Makefiles with resulting file lists.
28- 5 . Follow symbol renaming notes in ` include/zstd_compat_wrapper.h `
44+ 5 . Follow symbol renaming notes in ` include/zstd_compat_wrapper.h ` .
2945
30- ## Altering ZSTD and breaking changes
46+ ## Altering Zstd and breaking changes
3147
32- If ZSTD made changes that break compatibility or you need to make breaking
33- changes to the way we handle ZSTD , it is required to maintain backwards
48+ If Zstd made changes that break compatibility or you need to make breaking
49+ changes to the way we handle Zstd , it is required to maintain backwards
3450compatibility.
3551
36- We already save the ZSTD version number within the block header to be used
52+ We already save the Zstd version number within the block header to be used
3753to add future compatibility checks and/or fixes. However, currently it is
3854not actually used in such a way.
0 commit comments