git: sys/vfs/hammer: Cleanup sanity checks

2015-04-21 Thread Tomohiro Kusumi

commit 4fa5fb92edf94e3ddbbeecd94be13d3faf834b74
Author: Tomohiro Kusumi kusumi.tomoh...@gmail.com
Date:   Tue Apr 21 21:01:00 2015 +0900

sys/vfs/hammer: Cleanup sanity checks

- Move sanity checks to the beginning of the function.

- Check 'free_level  HAMMER_BIGBLOCK_SIZE'.
  free_level is somewhere between 0 and 8MB (inclusive).

Summary of changes:
 sys/vfs/hammer/hammer_reblock.c | 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4fa5fb92edf94e3ddbbeecd94be13d3faf834b74


-- 
DragonFly BSD source repository


git: sbin/hammer: Print big block size on reblock

2015-04-21 Thread Tomohiro Kusumi

commit f02dcec099ec5f57b8feaa11a75374ff3f6a8e88
Author: Tomohiro Kusumi kusumi.tomoh...@gmail.com
Date:   Tue Apr 21 23:20:04 2015 +0900

sbin/hammer: Print big block size on reblock

- 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.

Summary of changes:
 sbin/hammer/cmd_reblock.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f02dcec099ec5f57b8feaa11a75374ff3f6a8e88


-- 
DragonFly BSD source repository


git: sys/vfs/hammer: Cleanup cursor initialization code on reblock

2015-04-21 Thread Tomohiro Kusumi

commit 6540d157adb11e5bd59986ef07276232cbe3d0c1
Author: Tomohiro Kusumi kusumi.tomoh...@gmail.com
Date:   Tue Apr 21 21:08:56 2015 +0900

sys/vfs/hammer: Cleanup cursor initialization code on reblock

- Just make things a bit more clear.

- The rule is the ioctl caller sets localization type to reblock,
  and the ioctl code adds up ip localization to initialize cursor.

Summary of changes:
 sys/vfs/hammer/hammer_reblock.c | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6540d157adb11e5bd59986ef07276232cbe3d0c1


-- 
DragonFly BSD source repository


git: sys/vfs/hammer: Make hammer_blockmap_getfree() clear *curp on error case

2015-04-21 Thread Tomohiro Kusumi

commit ebadcc6a03cf84c75af34707d38dda1ea847418d
Author: Tomohiro Kusumi kusumi.tomoh...@gmail.com
Date:   Tue Apr 21 21:04:38 2015 +0900

sys/vfs/hammer: Make hammer_blockmap_getfree() clear *curp on error case

- Set *curp to either 0 or 1 regardless of *errorp.
  The previous return(0); case does this then all should do this.

Summary of changes:
 sys/vfs/hammer/hammer_blockmap.c | 2 ++
 1 file changed, 2 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ebadcc6a03cf84c75af34707d38dda1ea847418d


-- 
DragonFly BSD source repository


git: sbin/hammer: Print key_end.lo instead of key_beg.lo on reblock

2015-04-21 Thread Tomohiro Kusumi

commit d58869bda15ddc5e96c1c053196fcd3e56e340c6
Author: Tomohiro Kusumi kusumi.tomoh...@gmail.com
Date:   Wed Apr 22 00:15:21 2015 +0900

sbin/hammer: Print key_end.lo instead of key_beg.lo on reblock

- Print reblock.key_end.localization when reblock starts instead of
  reblock.key_beg.localization.

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

Summary of changes:
 sbin/hammer/cmd_reblock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d58869bda15ddc5e96c1c053196fcd3e56e340c6


-- 
DragonFly BSD source repository


git: sys/vfs/hammer: Fix comment

2015-04-21 Thread Tomohiro Kusumi

commit 558a44e2ea853e87cd77f5260c550f647b9b6326
Author: Tomohiro Kusumi kusumi.tomoh...@gmail.com
Date:   Tue Apr 21 21:02:47 2015 +0900

sys/vfs/hammer: Fix comment

- Sync a comment with what's written in reblock_usage().

Summary of changes:
 sys/vfs/hammer/hammer_reblock.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/558a44e2ea853e87cd77f5260c550f647b9b6326


-- 
DragonFly BSD source repository