sbin/hammer: Make hammer checkmap support zone4
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Fri, 24 Jul 2015 17:23:30 +0000 (02:23 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Fri, 24 Jul 2015 20:58:29 +0000 (05:58 +0900)
commitf858925654d59f990baf3c6d92d793ecb95bfb96
tree5d249a8776f1efc5486887e1041490b264525471
parent2550036fa4587a786e90ca4b6737c78481fa4ffa
sbin/hammer: Make hammer checkmap support zone4

- It's kind of obvious that zone4 never fails on checkmap tests,
  but it was a missing zone as it already supports btree and undos.

- Note that this commit changes condition of error=-5 case in
  blockmap_lookup() by adding "HAMMER_ZONE_FREEMAP_INDEX != zone &&".
  This is necessary as zone4 is really just zone2 and all the
  blockmap offsets have 0x02 in the upper 4 bits which means
  blockmap lookup for zone4 offset always hits this assertion.
  Normal filesystem operations (including other hammer commands
  and newfs_hammer) never need this condition change as they never
  lookup zone4 offset, and in fact blockmap lookup in kernel space
  doesn't have this, however this commit needs it. This should make
  sense though as zone4 really is an exceptional case where all
  data is just a bunch of metadata that is made to effectively
  map storage chunks to zone2.

- Update hammer(8). Now it supports all possible zones but
  it only mentions btree elements.
sbin/hammer/blockmap.c
sbin/hammer/cmd_blockmap.c
sbin/hammer/hammer.8