]> git.proxmox.com Git - mirror_zfs.git/commit
Add missing increment to dsl_deadlist_move_bpobj()
authorRichard Yao <richard.yao@alumni.stonybrook.edu>
Sat, 4 Mar 2023 23:42:01 +0000 (18:42 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 6 Mar 2023 23:28:26 +0000 (15:28 -0800)
commitb79e7114bb95862ebe6d98f0ac9692cae7798d17
treea890208414a83d51c476c42ae153a9db013846dc
parent8846139b45ff2ddd416f1a8b6227862e519898fc
Add missing increment to dsl_deadlist_move_bpobj()

dc5c8006f684b1df3f2d4b6b8c121447d2db0017 was recently merged to prefetch
up to 128 deadlists. Unfortunately, a loop was missing an increment,
such that it will prefetch all deadlists. The performance properties of
that patch probably should be re-evaluated.

This was caught by CodeQL's cpp/constant-comparison check in an
experimental branch where I am testing the security-and-extended
queries. It complained about the `i < 128` part of the loop condition
always evaluating to the same thing. The standard CodeQL configuration
we use missed this because it does not include that check.

Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14573
module/zfs/dsl_deadlist.c