git: sys/vfs/hammer: Add -A option to reblock|rebalance all pfs

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Tue Apr 28 08:55:13 PDT 2015


commit 5e1e14547fc7c6b6430fad19c2e5aabfddf19690
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Sat Apr 25 01:56:02 2015 +0900

    sys/vfs/hammer: Add -A option to reblock|rebalance all pfs
    
    - -A option makes certain per pfs hammer commands perform on all pfs
      of the filesystem that the [filesystem] arg belongs to. Currently
      hammer reblock and rebalance commands support this. It does nothing
      to other commands.
    
    - With -A option, above hammer commands use a range of 0 to 0xFFFF
      for pfs id (upper 16 bits) of the cursor localization. This makes
      it iterate all pfs in the filesystem.
    
    - Above difference in localization range means btree iteration
      applies to larger range of nodes in terms of pfs id, since it's
      been used as a top priority key that works as a localizing factor
      of pfs within the btree. There is no logical difference other than
      the range is different. So performing these commands on all pfs is
      as simple as changing the localization range (unless other keys are
      involved as additional parameters like hammer prune does).

Summary of changes:
 sbin/hammer/cmd_rebalance.c       |  1 +
 sbin/hammer/cmd_reblock.c         |  1 +
 sbin/hammer/hammer.8              | 19 ++++++++++++++++++-
 sbin/hammer/hammer.c              |  8 ++++++--
 sbin/hammer/hammer.h              |  1 +
 sys/vfs/hammer/hammer_ioctl.h     |  5 +++--
 sys/vfs/hammer/hammer_rebalance.c |  8 ++++++--
 sys/vfs/hammer/hammer_reblock.c   |  8 ++++++--
 8 files changed, 42 insertions(+), 9 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5e1e14547fc7c6b6430fad19c2e5aabfddf19690


-- 
DragonFly BSD source repository



More information about the Commits mailing list