HAMMER VFS: Conditionalize debug message
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 9 Mar 2012 06:04:10 +0000 (22:04 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 9 Mar 2012 06:04:10 +0000 (22:04 -0800)
* Conditionalize an annoying debug kprintf on hammer_debug_inode.

sys/vfs/hammer/hammer_inode.c

index 2bacd4e..397334c 100644 (file)
@@ -2435,9 +2435,11 @@ hammer_wait_inode(hammer_inode_t ip)
                if (ip->flush_state == HAMMER_FST_FLUSH) {
                        KKASSERT(ip->flush_group);
                        if (ip->flush_group->closed == 0) {
-                               kprintf("hammer: debug: forcing async "
-                                       "flush ip %016jx\n",
-                                       (intmax_t)ip->obj_id);
+                               if (hammer_debug_inode) {
+                                       kprintf("hammer: debug: forcing "
+                                               "async flush ip %016jx\n",
+                                               (intmax_t)ip->obj_id);
+                               }
                                hammer_flusher_async(ip->hmp,
                                                     ip->flush_group);
                                continue; /* retest */