git: sbin/hammer: Fix and change hammer show behavior when only lo is used
Tomohiro Kusumi
tkusumi at crater.dragonflybsd.org
Thu Sep 24 07:46:37 PDT 2015
commit 34909d8efe3ec8b36ce26db951ee1812b346476b
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date: Mon Sep 21 19:34:10 2015 +0900
sbin/hammer: Fix and change hammer show behavior when only lo is used
913b6663 has expanded hammer show's B-Tree directive from
lo:objid
to
lo:objid:rectype:key:tid
which allowed hammer show to filter B-Tree iteration in the
same way that the actual filesystem does on B-Tree lookup.
There was an exception in 913b6663 where one could not just
use lo directive, but was forced to use at least the first
two directives lo:objid. If objid wasn't specified then
HAMMER_MIN_OBJID was used for objid by default.
This was to keep compatibility with old behavior before
913b6663 added the rest of the directives (rectype:key:tid),
but this old behavior wasn't really useful for anything and
rather confusing given that all unspecified fields (after
the last specified field) except for objid were wildcard.
See sbin/hammer/hammer.c and sbin/hammer/cmd_show.c before
913b6663 (or really old one like v4.0 era) for details.
This commit normalizes this exceptional behavior and make
all option directives behave the same way. For example, if
*only* lo field is specified, then the rest of the fields
are wildcard. If the first n fields are specified, then the
remaining (5-n) fields are wildcard.
This does change the behavior when *only* lo is specified,
but the change should make the behavior less confusing.
Also update hammer(8) manpage since it hasn't been updated.
Summary of changes:
sbin/hammer/cmd_show.c | 15 ++++++---------
sbin/hammer/hammer.8 | 10 ++++++++--
2 files changed, 14 insertions(+), 11 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/34909d8efe3ec8b36ce26db951ee1812b346476b
--
DragonFly BSD source repository
More information about the Commits
mailing list