git: sbin/hammer: Make hammer checkmap support zone4
Tomohiro Kusumi
tkusumi at crater.dragonflybsd.org
Fri Jul 24 14:52:31 PDT 2015
commit f858925654d59f990baf3c6d92d793ecb95bfb96
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date: Sat Jul 25 02:23:30 2015 +0900
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.
Summary of changes:
sbin/hammer/blockmap.c | 3 ++-
sbin/hammer/cmd_blockmap.c | 62 ++++++++++++++++++++++++++++++++++++++++++++--
sbin/hammer/hammer.8 | 4 +--
3 files changed, 64 insertions(+), 5 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f858925654d59f990baf3c6d92d793ecb95bfb96
--
DragonFly BSD source repository
More information about the Commits
mailing list