HomeFreeBSD

Bring consistency to ABD chunk count types.

Description

Bring consistency to ABD chunk count types.

With both abd_size and abd_nents being uint_t it makes no sense for
abd_chunkcnt_for_bytes() to return size_t. Random mix of different
types used to count chunks looks bad and makes compiler more difficult
to optimize the code.

In particular on FreeBSD this change allows compiler to completely
optimize out abd_verify_scatter() when built without debug, removing
pointless 64-bit division and even more pointless empty loop.

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Closes #11279

Details

Provenance
mavAuthored on Dec 6 2020, 5:53 PM
GitHub <noreply@github.com>Committed on Dec 6 2020, 5:53 PM
Parents
rGeed2bfe06a60: Enable ABI checks for the checkstyle workflow
Branches
Unknown
Tags
Unknown