Submit #2740
closed[PATCH] sbin/hammer: fix output of hammer blockmap command
Description
I think "zone btree" of the following should be "zone freemap" since this whole L1/L2 iteration of 8MB chunks deals with freemap zone, but not disk space for btree zone.
- hammer -f /dev/ad1:/dev/ad2:/dev/ad3 blockmap
zone btree next 2000000000000000 alloc 2fffffffffffffff
layer1 4000000000000000 @2000000000800000 blocks-free 1204
4000000000000000 zone=4 app=8388608 free=0
4000000000800000 zone=4 app=8388608 free=0
4000000001000000 zone=3 app=8388608 free=0
4000000001800000 zone=3 app=8388608 free=0
4000000002000000 zone=3 app=8388608 free=0
4000000002800000 zone=3 app=8388608 free=0
4000000003000000 zone=3 app=8388608 free=0
I git blamed to find where this commit was made which was da44aa75 in 2008. From what has been #if0-ed, it seems to me "btree" literal should be "freemap".
commit da44aa75b99217e2bd602254eb232a2c14453c39
Author: Matthew Dillon <dillon@dragonflybsd.org>
Date: Sat Jul 19 18:48:15 2008 +0000HAMMER Utilities: Sync with HAMMER 65.
...
diff --git a/sbin/hammer/cmd_blockmap.c b/sbin/hammer/cmd_blockmap.c
index 24174ac..b772e21 100644
--- a/sbin/hammer/cmd_blockmap.c
+++ b/sbin/hammer/cmd_blockmap.c@ -31,18 +31,17
@
...
void
hammer_cmd_blockmap(void) {
+ dump_blockmap("btree", HAMMER_ZONE_FREEMAP_INDEX);
#if 0
dump_blockmap("btree", HAMMER_ZONE_BTREE_INDEX);
dump_blockmap("meta", HAMMER_ZONE_META_INDEX);@ -51,7 +50,7
@ hammer_cmd_blockmap(void)
#endif
}
Files