sys/vfs/hammer: Adjust raw kprintfs using hkprintf variants
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 12 Sep 2015 23:35:27 +0000 (08:35 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Thu, 24 Sep 2015 14:09:55 +0000 (23:09 +0900)
commit33234d1463ac31b11dd8753fedbc82520b905a07
tree51ab131fcd354050ec0cf0dfd33724ee1f37fb9d
parentdc75e798e8d40c31fb4085cd5a63cb9cf3d42b4d
sys/vfs/hammer: Adjust raw kprintfs using hkprintf variants

This is part3 of hkprintf related after the following two.
sys/vfs/hammer: Change hkprintf() to macro and add variants [2/2]
sys/vfs/hammer: Change hkprintf() to macro and add variants [1/2]

Above two commits have replaced the existing kprintf calls
using "HAMMER:" or "HAMMER(label)" or function name prefix
with hkprintf and newly added variants, which basically didn't
change actual output other than fixing wrong function names
to the right ones, etc.

This commit continues replacing remaining kprintfs to make
output more understandable than raw kprintf calls with no clue
that they're hammer related.

For example, an error message like
"BIGBLOCK UNDERFLOW\n"
or a debug message like
"rt %3u, xt %3u, tt %3u\n"
become more understanbale with "HAMMER:" prefix or the name
of the function.

This commit is based on the followings.
1. Use hdkprintf which is hkprintf variant with __func__ prefix
   if that kprintf call is used when vfs.hammer.debug_xxx is
   enabled. This implies the messages are only for debugging
   and those are usually better and more understandable with
   a function name prefix as mentioned above. Also this is
   what's been done mostly in the existing hammer code.
2. Use hkprintf which has "HAMMER:" prefix if that kprintf
   call is a regular hammer message that appears in regular
   filesystem operations such as
   "Formatting of valid HAMMER volume %s denied. Erase with dd!\n".
3. Use h[vm]kprintf which are hkprintf variants with hammer
   label prefix "HAMMER(label)" if that kprintf can safely
   access the label via vol or hmp pointer. Some kprintfs in
   hammer does this rather than just "HAMMER:" and this seems
   to be better, however this commit doesn't go far as to
   aggressively replace the existing ones with this because
   a caller safely dereferencing hmp or vol is a different
   topic from merely replacing.
20 files changed:
sys/vfs/hammer/hammer_blockmap.c
sys/vfs/hammer/hammer_btree.c
sys/vfs/hammer/hammer_cursor.c
sys/vfs/hammer/hammer_dedup.c
sys/vfs/hammer/hammer_flusher.c
sys/vfs/hammer/hammer_inode.c
sys/vfs/hammer/hammer_io.c
sys/vfs/hammer/hammer_ioctl.c
sys/vfs/hammer/hammer_mirror.c
sys/vfs/hammer/hammer_object.c
sys/vfs/hammer/hammer_ondisk.c
sys/vfs/hammer/hammer_prune.c
sys/vfs/hammer/hammer_rebalance.c
sys/vfs/hammer/hammer_reblock.c
sys/vfs/hammer/hammer_recover.c
sys/vfs/hammer/hammer_redo.c
sys/vfs/hammer/hammer_transaction.c
sys/vfs/hammer/hammer_undo.c
sys/vfs/hammer/hammer_vnops.c
sys/vfs/hammer/hammer_volume.c