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 6 2023, 11:28 PM
Parents
rG8846139b45ff: SHA2Init() should use signed assertions when checking an enum
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGb79e7114bb95: Add missing increment to dsl_deadlist_move_bpobj() (authored by Richard Yao <richard.yao@alumni.stonybrook.edu>).Mar 6 2023, 11:28 PM