]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
zfs_prune: reset sc.nr_to_scan
authorchrisrd <chris@onthe.net.au>
Wed, 5 Jan 2022 01:07:33 +0000 (12:07 +1100)
committerGitHub <noreply@github.com>
Wed, 5 Jan 2022 01:07:33 +0000 (17:07 -0800)
commit2a149775b4c39c13efe047fe5b3a2e3752d8fed1
tree2904df20580cc44161615d8e336e1d6045307ded
parent3c80e0742a8fa012d5f2048e362a6235f8ec2304
zfs_prune: reset sc.nr_to_scan

sc.nr_to_scan is an input to super_cache_clean (via
shrinker->scan_objects), used to set the number of objects to scan
in the various caches. However super_cache_scan also modifies
sc.nr_to_scan, so when used in a loop we need to reset
sc.nr_to_scan back to our desired nr_to_scan for the next
iteration.

Issue discovered and solution suggested by
Tenzin Lhakhang @tlhakhan.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chris Dunlop <chris@onthe.net.au>
Issue #12433
Closes #12908
module/os/linux/zfs/zfs_vfsops.c