sys/vfs/hammer: Define and use HAMMER_ENCODE() on blockmap formatting
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Mon, 6 Jul 2015 09:57:29 +0000 (18:57 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Mon, 6 Jul 2015 15:24:27 +0000 (00:24 +0900)
commitcbf2551d357e12f6542918b590bebd3f21c147b5
tree1fdbe04796949093f9b216b6ad7b4bdf8316be11
parent3f08a1b8689869254a8b6f7be7d6bf99072c0083
sys/vfs/hammer: Define and use HAMMER_ENCODE() on blockmap formatting

- Add HAMMER_ENCODE() which is a generic version of existing
  macros HAMMER_ENCODE_{RAW_VOLUME|RAW_BUFFER|FREEMAP}().

- Use HAMMER_ENCODE() in format_blockmap() in userspace when newfs
  initializes blockmap offsets. This is better in the sense that
  the macro hides internal of hammer's storage address space format,
  and gets rid of bitwise operations that make assumption on format.
sbin/hammer/ondisk.c
sys/vfs/hammer/hammer_disk.h