mirror_zfs/cmd/zdb
Ivan Shapovalov cf9163f250 zdb: adjust block histogram binning strategy
Previously, a bin included all blocks _starting_ from given size
(e.g., a "4K" bin would include all blocks within the [4K; 8K) region).
This is counter-intuitive and does not match the typical use-case of the
block histogram (that is, to estimate disk usage considering how ZFS'
block allocation works). In other words, if I'm looking at the "4K" row,
I'm interested in records that _fit into_ a 4K block.

Adjust the binning strategy such that a bin includes all blocks _up to_
given size, such that e.g. a "4K" bin would include all blocks within
the (2K; 4K] region.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
Closes #16999
2025-10-21 09:50:43 -07:00
..
Makefile.am build: rename FORCEDEBUG_CPPFLAGS to LIBZPOOL_CPPFLAGS 2024-08-27 12:53:27 -07:00
zdb_il.c Add allocation profile export and zhack subcommand for import 2025-09-10 15:01:28 -07:00
zdb.c zdb: adjust block histogram binning strategy 2025-10-21 09:50:43 -07:00
zdb.h Add allocation profile export and zhack subcommand for import 2025-09-10 15:01:28 -07:00