sbin/hammer: Print key_end.lo instead of key_beg.lo on reblock
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Tue, 21 Apr 2015 15:15:21 +0000 (00:15 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Tue, 21 Apr 2015 16:53:42 +0000 (01:53 +0900)
- Print reblock.key_end.localization when reblock starts instead of
  reblock.key_beg.localization.

- hammer reblock printing 0000 while reblock-inodes printing 0001
  and reblock-data|dirs printing 0002 seems strange because reblock
  covers all localization types ranging from MIN(0000) to MAX(ffff)
  on btree iteration (which obviously includes existing two types
  for inode and misc). Printing end localization should make better
  sense here.

sbin/hammer/cmd_reblock.c

index 9875a92..1d7c6d2 100644 (file)
@@ -96,7 +96,7 @@ hammer_cmd_reblock(char **av, int ac, int flags)
                reblock.free_level = 0;
        printf("reblock start %016jx:%04x\nfree level %d/%d\n",
                (uintmax_t)reblock.key_beg.obj_id,
                reblock.free_level = 0;
        printf("reblock start %016jx:%04x\nfree level %d/%d\n",
                (uintmax_t)reblock.key_beg.obj_id,
-               reblock.key_beg.localization,
+               reblock.key_end.localization,
                reblock.free_level,
                HAMMER_BIGBLOCK_SIZE);
 
                reblock.free_level,
                HAMMER_BIGBLOCK_SIZE);