]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/arc.c
Linux 3.12 compat: shrinker semantics
authorTim Chase <tim@chase2k.com>
Thu, 2 Oct 2014 12:21:08 +0000 (07:21 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 28 Oct 2014 16:34:51 +0000 (09:34 -0700)
commited6e9cc235b47b5c940178926715f871bd36dc5e
tree53ba7485463ca7c97aa3d2790afab1536919e410
parent9635861742c6ac334877f944e17948aa11c2e57a
Linux 3.12 compat: shrinker semantics

The new shrinker API as of Linux 3.12 modifies "struct shrinker" by
replacing the @shrink callback with the pair of @count_objects and
@scan_objects.  It also requires the return value of @count_objects to
return the number of objects actually freed whereas the previous @shrink
callback returned the number of remaining freeable objects.

This patch adds support for the new @scan_objects return value semantics.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tim Chase <tim@chase2k.com>
Closes #2837
module/zfs/arc.c