sbin/hammer: Print big block size on reblock
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Tue, 21 Apr 2015 14:20:04 +0000 (23:20 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Tue, 21 Apr 2015 14:42:49 +0000 (23:42 +0900)
- Print free_level/big_block_size when reblock starts instead of
  just free_level.

- The meaning of 'fill_percentage' arg is easier to understand
  this way because the big block size is not obvious for most users
  while this arg is about selecting which big block to defrag.

sbin/hammer/cmd_reblock.c

index 9989d63..9875a92 100644 (file)
@@ -94,10 +94,11 @@ hammer_cmd_reblock(char **av, int ac, int flags)
        reblock.free_level = HAMMER_BIGBLOCK_SIZE - reblock.free_level;
        if (reblock.free_level < 0)
                reblock.free_level = 0;
-       printf("reblock start %016jx:%04x free level %d\n",
+       printf("reblock start %016jx:%04x\nfree level %d/%d\n",
                (uintmax_t)reblock.key_beg.obj_id,
                reblock.key_beg.localization,
-               reblock.free_level);
+               reblock.free_level,
+               HAMMER_BIGBLOCK_SIZE);
 
        fd = open(filesystem, O_RDONLY);
        if (fd < 0)