aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zstream
diff options
context:
space:
mode:
authorMatthew Ahrens <[email protected]>2020-06-27 10:27:02 -0700
committerGitHub <[email protected]>2020-06-27 10:27:02 -0700
commit270ece24b6f90c649a6c8880adec161119b60e18 (patch)
treeee9c52f01494d5d6b060c547bace9162789d460f /cmd/zstream
parentec1fea4516ac2f0c08d31d6308929298d1b281d0 (diff)
Revise SPL wrapper for shrinker callbacks
The SPL provides a wrapper for the kernel's shrinker callbacks, which enables the ZFS code to interface with multiple versions of the shrinker API's from different kernel versions. Specifically, Linux kernels 3.0 - 3.11 has a single "combined" callback, and Linux kernels 3.12 and later have two "split" callbacks. The SPL provides a wrapper function so that the ZFS code only needs to implement one version of the callbacks. Currently the SPL's wrappers are designed such that the ZFS code implements the older, "combined" callback. There are a few downsides to this approach: * The general design within ZFS is for the latest Linux kernel to be considered the "first class" API. * The newer, "split" callback API is easier to understand, because each callback has one purpose. * The current wrappers do not completely abstract out the differing API's, so ZFS code needs `#ifdef` code to handle the differing return values required for different kernel versions. This commit addresses these drawbacks by having the ZFS code provide the latest, "split" callbacks, and the SPL provides a wrapping function for the older, "combined" API. Reviewed-by: Pavel Zakharov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matthew Ahrens <[email protected]> Closes #10502
Diffstat (limited to 'cmd/zstream')
0 files changed, 0 insertions, 0 deletions