mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
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
This commit is contained in:
@@ -36,6 +36,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
extern boolean_t brt_entry_decref(spa_t *spa, const blkptr_t *bp);
|
||||
extern uint64_t brt_entry_get_refcount(spa_t *spa, const blkptr_t *bp);
|
||||
|
||||
extern uint64_t brt_get_dspace(spa_t *spa);
|
||||
extern uint64_t brt_get_used(spa_t *spa);
|
||||
|
||||
Reference in New Issue
Block a user