]> git.proxmox.com Git - mirror_zfs.git/commit
zdb: include cloned blocks in block statistics
authorRob N <rob.norris@klarasystems.com>
Tue, 1 Aug 2023 15:56:30 +0000 (01:56 +1000)
committerGitHub <noreply@github.com>
Tue, 1 Aug 2023 15:56:30 +0000 (08:56 -0700)
commit114a39964f5c8d89558d2823f1211f2258825ec7
tree416830f20c5aa665cb54b65459d07e86043c795c
parenta21ca18d4d2943667aa409a6dc2a9c8ad033e331
zdb: include cloned blocks in block statistics

This gives `zdb -b` support for clone blocks.

Previously, it didn't know what clones were, so would count their space
allocation multiple times and then report leaked space (or, in debug,
would assert trying to claim blocks a second time).

This commit fixes those bugs, and reports the number of clones and the
space "used" (saved) by them.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Kay Pedersen <mail@mkwg.de>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Sponsored-By: OpenDrives Inc.
Sponsored-By: Klara Inc.
Closes #15123
cmd/zdb/zdb.c
include/sys/brt.h
module/zfs/brt.c