HomeFreeBSD

zfs_prune: reset sc.nr_to_scan

Description

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

Details

Provenance
chrisrd <chris@onthe.net.au>Authored on Jan 5 2022, 1:07 AM
GitHub <noreply@github.com>Committed on Jan 5 2022, 1:07 AM
Parents
rG3c80e0742a8f: Verify dRAID empty sectors
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG2a149775b4c3: zfs_prune: reset sc.nr_to_scan (authored by chrisrd <chris@onthe.net.au>).Jan 5 2022, 1:07 AM