|
From: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
|
|
Date: Fri, 28 Nov 2014 3:40:53 +0900
|
|
Subject: [PATCH] sbin/hammer: fix output of hammer blockmap command
|
|
|
|
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 +0000
|
|
>
|
|
> HAMMER 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
|
|
> }
|
|
---
|
|
sbin/hammer/cmd_blockmap.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/sbin/hammer/cmd_blockmap.c b/sbin/hammer/cmd_blockmap.c
|
|
index 86bc2cb..15ebd67 100644
|
|
--- a/sbin/hammer/cmd_blockmap.c
|
|
+++ b/sbin/hammer/cmd_blockmap.c
|
|
@@ -58,7 +58,7 @@ static void dump_collect(collect_t collect);
|
|
void
|
|
hammer_cmd_blockmap(void)
|
|
{
|
|
- dump_blockmap("btree", HAMMER_ZONE_FREEMAP_INDEX);
|
|
+ dump_blockmap("freemap", HAMMER_ZONE_FREEMAP_INDEX);
|
|
}
|
|
|
|
static
|
|
--
|
|
1.9.3
|
|
|