sys/vfs/hammer: Add -A option to reblock|rebalance all pfs
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Fri, 24 Apr 2015 16:56:02 +0000 (01:56 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Tue, 28 Apr 2015 15:36:17 +0000 (00:36 +0900)
commit5e1e14547fc7c6b6430fad19c2e5aabfddf19690
treefc6e4d586ea78f2f93d89db4a9f81329a087fb3a
parentcac4bde9d5c410ccf1930eece812c078d59381d0
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).
sbin/hammer/cmd_rebalance.c
sbin/hammer/cmd_reblock.c
sbin/hammer/hammer.8
sbin/hammer/hammer.c
sbin/hammer/hammer.h
sys/vfs/hammer/hammer_ioctl.h
sys/vfs/hammer/hammer_rebalance.c
sys/vfs/hammer/hammer_reblock.c