]> git.proxmox.com Git - mirror_spl.git/commit
Linux shrinker compat
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 23 Mar 2011 22:45:55 +0000 (15:45 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 7 Apr 2011 03:06:03 +0000 (20:06 -0700)
commit495bd532ab4aaef46b57094d59707bad91e6ec25
tree16bd9d692bfe445673dd52c01c7b34ae665682cd
parent91cb1d91a4cf0dfa360f09747915699d0bef3d6f
Linux shrinker compat

The Linux shrinker has gone through three API changes since 2.6.22.
Rather than force every caller to understand all three APIs this
change consolidates the compatibility code in to the mm-compat.h
header.  The caller then can then use a single spl provided
shrinker API which does the right thing for your kernel.

SPL_SHRINKER_CALLBACK_PROTO(shrinker_callback, cb, nr_to_scan, gfp_mask);
SPL_SHRINKER_DECLARE(shrinker_struct, shrinker_callback, seeks);
spl_register_shrinker(&shrinker_struct);
spl_unregister_shrinker(&&shrinker_struct);
spl_exec_shrinker(&shrinker_struct, nr_to_scan, gfp_mask);
include/linux/mm_compat.h
module/spl/spl-kmem.c