HomeFreeBSD

Add missing increment to dsl_deadlist_move_bpobj()

Description

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

Details

Provenance
Richard Yao <richard.yao@alumni.stonybrook.edu>Authored on Mar 4 2023, 11:42 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Mar 7 2023, 5:08 PM
Parents
rG231a37c4c0fd: Optimize the is_l2cacheable functions
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG6281b5c4882f: Add missing increment to dsl_deadlist_move_bpobj() (authored by Richard Yao <richard.yao@alumni.stonybrook.edu>).Mar 7 2023, 5:08 PM