]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ocfs2: Remove mlog(0) from fs/ocfs2/suballoc.c
authorTao Ma <boyu.mt@taobao.com>
Tue, 22 Feb 2011 00:24:01 +0000 (08:24 +0800)
committerTao Ma <boyu.mt@taobao.com>
Tue, 22 Feb 2011 00:24:01 +0000 (08:24 +0800)
This is the 4th step to remove the debug info of DISK_ALLOC.

Signed-off-by: Tao Ma <boyu.mt@taobao.com>
fs/ocfs2/ocfs2_trace.h
fs/ocfs2/resize.c

index 11980ecba546081b0f56c45e2defe37993709d52..335edc50f1320f3b78436bff7253dc896d46d8eb 100644 (file)
@@ -590,6 +590,16 @@ DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_local_alloc_new_window_result);
 
 /* End of trace events for fs/ocfs2/localalloc.c. */
 
+/* Trace events for fs/ocfs2/resize.c. */
+
+DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_update_last_group_and_inode);
+
+DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_group_extend);
+
+DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_group_add);
+
+/* End of trace events for fs/ocfs2/resize.c. */
+
 /* Trace events for fs/ocfs2/suballoc.c. */
 
 DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_group_descriptor);
index 76b37909a4a1e61d5c1ab73339e04978f14f54d3..761d20da9dcd1c8f9cd8c00875b4740433ce4a30 100644 (file)
@@ -39,6 +39,7 @@
 #include "super.h"
 #include "sysfile.h"
 #include "uptodate.h"
+#include "ocfs2_trace.h"
 
 #include "buffer_head_io.h"
 #include "suballoc.h"
@@ -102,8 +103,8 @@ static int ocfs2_update_last_group_and_inode(handle_t *handle,
        u16 cl_bpc = le16_to_cpu(cl->cl_bpc);
        u16 cl_cpg = le16_to_cpu(cl->cl_cpg);
 
-       mlog(0, "(new_clusters=%d, first_new_cluster = %u)\n",
-            new_clusters, first_new_cluster);
+       trace_ocfs2_update_last_group_and_inode(new_clusters,
+                                               first_new_cluster);
 
        ret = ocfs2_journal_access_gd(handle, INODE_CACHE(bm_inode),
                                      group_bh, OCFS2_JOURNAL_ACCESS_WRITE);
@@ -340,7 +341,8 @@ int ocfs2_group_extend(struct inode * inode, int new_clusters)
                goto out_unlock;
        }
 
-       mlog(0, "extend the last group at %llu, new clusters = %d\n",
+
+       trace_ocfs2_group_extend(
             (unsigned long long)le64_to_cpu(group->bg_blkno), new_clusters);
 
        handle = ocfs2_start_trans(osb, OCFS2_GROUP_EXTEND_CREDITS);
@@ -515,8 +517,8 @@ int ocfs2_group_add(struct inode *inode, struct ocfs2_new_group_input *input)
                goto out_unlock;
        }
 
-       mlog(0, "Add a new group  %llu in chain = %u, length = %u\n",
-            (unsigned long long)input->group, input->chain, input->clusters);
+       trace_ocfs2_group_add((unsigned long long)input->group,
+                              input->chain, input->clusters, input->frees);
 
        handle = ocfs2_start_trans(osb, OCFS2_GROUP_ADD_CREDITS);
        if (IS_ERR(handle)) {