mirror_zfs/module
Matthew Ahrens 270ece24b6
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 <pavel.zakharov@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #10502
2020-06-27 10:27:02 -07:00
..
avl Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
icp Make Skein_{Get,Put}64_LSB_First inline functions 2020-06-18 12:21:38 -07:00
lua Switch off -Wmissing-prototypes for libgcc math functions 2020-06-18 12:21:46 -07:00
nvpair Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
os Revise SPL wrapper for shrinker callbacks 2020-06-27 10:27:02 -07:00
spl Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
unicode Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
zcommon Add include files for prototypes 2020-06-18 12:21:25 -07:00
zfs ARC shrinking blocks reads/writes 2020-06-26 10:42:27 -07:00
.gitignore Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
Kbuild.in Move zfs_gitrev.h to build directory 2020-06-24 18:19:28 -07:00
Makefile.bsd Move zfs_gitrev.h to build directory 2020-06-24 18:19:28 -07:00
Makefile.in Include FreeBSD sources in module dist 2020-06-26 14:19:35 -07:00