commit 33234d1463ac31b11dd8753fedbc82520b905a07 Author: Tomohiro Kusumi <kusumi.tomoh...@gmail.com> Date: Sun Sep 13 08:35:27 2015 +0900
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. Summary of changes: sys/vfs/hammer/hammer_blockmap.c | 4 ++-- sys/vfs/hammer/hammer_btree.c | 24 ++++++++++++------------ sys/vfs/hammer/hammer_cursor.c | 2 +- sys/vfs/hammer/hammer_dedup.c | 4 ++-- sys/vfs/hammer/hammer_flusher.c | 2 +- sys/vfs/hammer/hammer_inode.c | 26 +++++++++++++++----------- sys/vfs/hammer/hammer_io.c | 2 +- sys/vfs/hammer/hammer_ioctl.c | 2 +- sys/vfs/hammer/hammer_mirror.c | 2 +- sys/vfs/hammer/hammer_object.c | 12 ++++++------ sys/vfs/hammer/hammer_ondisk.c | 14 +++++++------- sys/vfs/hammer/hammer_prune.c | 10 +++++----- sys/vfs/hammer/hammer_rebalance.c | 7 +++---- sys/vfs/hammer/hammer_reblock.c | 12 +++++------- sys/vfs/hammer/hammer_recover.c | 28 ++++++++++++++-------------- sys/vfs/hammer/hammer_redo.c | 4 ++-- sys/vfs/hammer/hammer_transaction.c | 2 +- sys/vfs/hammer/hammer_undo.c | 4 ++-- sys/vfs/hammer/hammer_vnops.c | 26 +++++++++++++------------- sys/vfs/hammer/hammer_volume.c | 35 ++++++++++++++++++----------------- 20 files changed, 112 insertions(+), 110 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/33234d1463ac31b11dd8753fedbc82520b905a07 -- DragonFly BSD source repository