HomeFreeBSD

Fix long_free_dirty accounting for small files (#16264)

Description

Fix long_free_dirty accounting for small files (#16264)

For files smaller than recordsize, it's most likely that they don't have
L1 blocks. However, current calculation will always return at least 1 L1
block.

In this change, we check dnode level to figure out if it has L1 blocks
or not, and return 0 if it doesn't. This will reduce the chance of
unnecessary throttling when deleting a large number of small files.

Signed-off-by: Chunwei Chen <david.chen@nutanix.com>
Co-authored-by: Chunwei Chen <david.chen@nutanix.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>

Details

Provenance
Chunwei Chen <tuxoko@gmail.com>Authored on Jul 23 2024, 6:34 PM
Tony Hutter <hutter2@llnl.gov>Committed on Jul 23 2024, 7:02 PM
Parents
rG9ad205ecded2: AUTHORS: refresh with recent new contributors (#16362)
Branches
Unknown
Tags
Unknown