git: sbin/hammer: Don't show irrelevant "BM" and "d" after root split

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Mon Mar 2 11:50:10 PST 2015


commit 2f8c6a592f4f91d24fed1dbb59c04ba2ca55d251
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Tue Mar 3 01:32:05 2015 +0900

    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% {

Summary of changes:
 sbin/hammer/cmd_show.c | 44 +++++++++++++++++++++++++++++++++++---------
 1 file changed, 35 insertions(+), 9 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/2f8c6a592f4f91d24fed1dbb59c04ba2ca55d251


-- 
DragonFly BSD source repository



More information about the Commits mailing list