sbin/hammer: Don't show irrelevant "BM" and "d" after root split
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Mon, 2 Mar 2015 16:32:05 +0000 (01:32 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Mon, 2 Mar 2015 19:38:35 +0000 (04:38 +0900)
commit2f8c6a592f4f91d24fed1dbb59c04ba2ca55d251
treeab304806dbed33f7a77bd824fa5dade76fd103c4
parent01fdc7360c70b2473001b17fbd9bfcdc50590601
sbin/hammer: Don't show irrelevant "BM" and "d" after root split

- Make hammer show command suppress irrelevant outputs
  "BM NODE ..." and "d tids ..." after splitting the root node.

- When splitting the root node HAMMER uses a copy of predefined special
  node element that has static member values (regardless of other nodes
  within the btree). After the split, this predefined special element
  will be elms[0] of the (new)root node that has a pointer to the old
  root node as its current child.

- However this elms[0] always has 0 for internal.mirror_tid and 1 for
  base.delete_tid (till it's updated) which results hammer show command
  showing unnecessary "BM" and "d". This commit suppress "BM" that
  doesn't actually indicate invalid mirror tid, and suppress "d" that
  doesn't indicate actual delete as following diff of two results shows.

22c22
<         d tids 0000000000000001:0000000000000001 suboff=8000000020800000 mirror 0000000000000000
---
>           tids 0000000000000001:0000000000000001 suboff=8000000020800000 mirror 0000000000000000
46c46
< BM   NODE 8000000020800000 cnt=43 p=8000000020801000 type=L depth=1 mirror 0000000100098160 fill=z8:65=1% {
---
>      NODE 8000000020800000 cnt=43 p=8000000020801000 type=L depth=1 mirror 0000000100098160 fill=z8:65=1% {
sbin/hammer/cmd_show.c