sbin/hammer: Don't show FLAG_BADMIRRORTID for root node in certain corner case situation
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 28 Feb 2015 20:06:01 +0000 (05:06 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 28 Feb 2015 21:49:12 +0000 (06:49 +0900)
commit44cd685c7ff64915c6067e9911cb9d6f03e2eaf8
treea22dd2fa14a1c9a6df7b3005204e215253a20e8b
parent17958f92d4f32316b39587da1fb1d83801539ffa
sbin/hammer: Don't show FLAG_BADMIRRORTID for root node in certain corner case situation

- Make hammer show command stop showwing an error flag regarding
  mirror tid that isn't actually an error.

- newfs_hammer initializes the root node's mirror_tid with 0 along
  with its first two elements, but this mirror_tid is not updated
  till the third element is allocated (by creating a file, etc).
  Following result shows this situation.

- In this situation the root node's node->mirror_tid (==0) being
  smaller than elm->base.create_tid or elm->base.delete_tid is not
  an error. This only happens on the root node because all the other
  nodes get updated when they split from existing ones.

     NODE 8000000020800000 cnt=02 p=0000000000000000 type=L depth=0 mirror 0000000000000000 fill=z8:65=1% {
B-----M ELM  0 R lo=00000001 obj=0000000000000001 rt=01 key=0000000000000000 ot=01
         tids 0000000100000001:0000000000000000
 <snip>
B-----M ELM  1 R lo=00000002 obj=0000000000000001 rt=15 key=0000000000000000 ot=00
         tids 0000000100000001:0000000000000000
 <snip>
     }
sbin/hammer/cmd_show.c
sbin/newfs_hammer/newfs_hammer.c