From: Tao Ma <tm@tao.ma>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 08/34] ocfs2: Remove mlog(0) from fs/ocfs2/suballoc.c
Date: Thu, 23 Dec 2010 15:30:51 +0800 [thread overview]
Message-ID: <1293089477-5019-8-git-send-email-tm@tao.ma> (raw)
In-Reply-To: <4D12F7E7.1090204@tao.ma>
From: Tao Ma <tao.ma@oracle.com>
This is the 4th step to remove the debug info of DISK_ALLOC.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
---
fs/ocfs2/ocfs2_trace.h | 25 +++++++++++++++++++++++++
fs/ocfs2/resize.c | 12 +++++++-----
2 files changed, 32 insertions(+), 5 deletions(-)
diff --git a/fs/ocfs2/ocfs2_trace.h b/fs/ocfs2/ocfs2_trace.h
index 196a995..1d518d5 100644
--- a/fs/ocfs2/ocfs2_trace.h
+++ b/fs/ocfs2/ocfs2_trace.h
@@ -784,6 +784,31 @@ DEFINE_EVENT(ocfs2__ull_uint, ocfs2_local_alloc_new_window_result,
);
/* End of trace events for fs/ocfs2/localalloc.c. */
+/* Trace events for fs/ocfs2/resize.c. */
+DEFINE_EVENT(ocfs2__uint_uint, ocfs2_update_last_group_and_inode,
+
+ TP_PROTO(unsigned int new_clusters, unsigned int first_new_cluster),
+
+ TP_ARGS(new_clusters, first_new_cluster)
+);
+
+DEFINE_EVENT(ocfs2__ull_uint, ocfs2_group_extend,
+
+ TP_PROTO(unsigned long long bg_blkno, unsigned int new_clusters),
+
+ TP_ARGS(bg_blkno, new_clusters)
+);
+
+DEFINE_EVENT(ocfs2__ull_uint_uint_uint, ocfs2_group_add,
+
+ TP_PROTO(unsigned long long bg_blkno, unsigned int chain,
+ unsigned int clusters, unsigned int frees),
+
+ TP_ARGS(bg_blkno, chain, clusters, frees)
+);
+
+/* End of trace events for fs/ocfs2/resize.c. */
+
/* Trace events for fs/ocfs2/suballoc.c. */
DEFINE_EVENT(ocfs2__ull, ocfs2_validate_group_descriptor,
diff --git a/fs/ocfs2/resize.c b/fs/ocfs2/resize.c
index 76b3790..761d20d 100644
--- a/fs/ocfs2/resize.c
+++ b/fs/ocfs2/resize.c
@@ -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)) {
--
1.7.0.4
next prev parent reply other threads:[~2010-12-23 7:30 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-23 7:19 [Ocfs2-devel] [PATCH 00/34] OCFS2: Add trace event and replace mlog(0) Tao Ma
2010-12-23 7:30 ` [Ocfs2-devel] [PATCH 01/34] ocfs2: Remove unused truncate function from alloc.c Tao Ma
2010-12-28 22:54 ` Mark Fasheh
2010-12-23 7:30 ` [Ocfs2-devel] [PATCH 02/34] ocfs2: Remove ENTRY from masklog Tao Ma
2010-12-23 7:30 ` [Ocfs2-devel] [PATCH 03/34] ocfs2: Remove EXIT " Tao Ma
2010-12-23 7:30 ` [Ocfs2-devel] [PATCH 04/34] ocfs2: Add ocfs2_trace.h Tao Ma
2010-12-31 12:40 ` Joel Becker
2010-12-23 7:30 ` [Ocfs2-devel] [PATCH 05/34] ocfs2: Remove mlog(0) from fs/ocfs2/alloc.c Tao Ma
2010-12-31 13:15 ` Christoph Hellwig
2010-12-31 14:27 ` Tao Ma
2010-12-23 7:30 ` [Ocfs2-devel] [PATCH 06/34] ocfs2: Remove mlog(0) from fs/ocfs2/localalloc.c Tao Ma
2010-12-23 7:30 ` [Ocfs2-devel] [PATCH 07/34] ocfs2: Remove mlog(0) from fs/ocfs2/suballoc.c Tao Ma
2010-12-23 7:30 ` Tao Ma [this message]
2010-12-23 7:30 ` [Ocfs2-devel] [PATCH 09/34] ocfs2: Remove DISK_ALLOC from masklog Tao Ma
2010-12-23 7:30 ` [Ocfs2-devel] [PATCH 10/34] ocfs2: Remove masklog ML_REFCOUNT Tao Ma
2010-12-23 7:30 ` [Ocfs2-devel] [PATCH 11/34] ocfs2: Remove mlog(0) from fs/ocfs2/aops.c Tao Ma
2010-12-23 7:30 ` [Ocfs2-devel] [PATCH 12/34] ocfs2: Remove FILE_IO from masklog Tao Ma
2010-12-23 7:30 ` [Ocfs2-devel] [PATCH 13/34] ocfs2: remove INODE from unused files Tao Ma
2010-12-23 7:30 ` [Ocfs2-devel] [PATCH 14/34] ocfs2: Remove mlog(0) from fs/ocfs2/file.c Tao Ma
2010-12-23 7:30 ` [Ocfs2-devel] [PATCH 15/34] ocfs2: Little refactoring against ocfs2_iget Tao Ma
2010-12-23 7:30 ` [Ocfs2-devel] [PATCH 16/34] ocfs2: Remove masklog ML_INODE Tao Ma
2010-12-23 7:31 ` [Ocfs2-devel] [PATCH 17/34] ocfs2: Remove masklog ML_EXTENT_MAP Tao Ma
2010-12-23 7:31 ` [Ocfs2-devel] [PATCH 18/34] ocfs2: Remove mlog(0) from fs/ocfs2/slot_map.c Tao Ma
2010-12-23 7:31 ` [Ocfs2-devel] [PATCH 19/34] ocfs2: Remove mlog(0) from fs/ocfs2/heartbeat.c Tao Ma
2010-12-23 7:31 ` [Ocfs2-devel] [PATCH 20/34] ocfs2: Remove masklog ML_SUPER Tao Ma
2010-12-23 7:31 ` [Ocfs2-devel] [PATCH 21/34] ocfs2: Remove masklog ML_XATTR Tao Ma
2010-12-23 7:31 ` [Ocfs2-devel] [PATCH 22/34] ocfs2: Remove masklog ML_RESERVATIONS Tao Ma
2010-12-23 7:31 ` [Ocfs2-devel] [PATCH 23/34] ocfs2: Remove mlog(0) from quota_local.c Tao Ma
2010-12-23 7:31 ` [Ocfs2-devel] [PATCH 24/34] ocfs2: Remove masklog ML_QUOTA Tao Ma
2010-12-23 7:31 ` [Ocfs2-devel] [PATCH 25/34] ocfs2: remove NAMEI from symlink.c Tao Ma
2010-12-23 7:31 ` [Ocfs2-devel] [PATCH 26/34] ocfs2: Remove mlog(0) from fs/ocfs2/dir.c Tao Ma
2010-12-23 7:31 ` [Ocfs2-devel] [PATCH 27/34] ocfs2: Remove masklog ML_NAMEI Tao Ma
2010-12-23 7:31 ` [Ocfs2-devel] [PATCH 28/34] ocfs2: Remove masklog ML_DCACHE Tao Ma
2010-12-23 7:31 ` [Ocfs2-devel] [PATCH 29/34] ocfs2: Remove masklog ML_EXPORT Tao Ma
2010-12-23 7:31 ` [Ocfs2-devel] [PATCH 30/34] ocfs2: Remove masklog ML_JOURNAL Tao Ma
2010-12-23 7:31 ` [Ocfs2-devel] [PATCH 31/34] ocfs2: Remove masklog ML_BH_IO Tao Ma
2010-12-23 7:31 ` [Ocfs2-devel] [PATCH 32/34] ocfs2: Remove masklog ML_UPTODATE Tao Ma
2010-12-23 7:31 ` [Ocfs2-devel] [PATCH 33/34] ocfs2: Remove masklog ML_AIO Tao Ma
2010-12-23 7:31 ` [Ocfs2-devel] [PATCH 34/34] ocfs2: Make the left masklogs compat Tao Ma
2010-12-23 7:32 ` [Ocfs2-devel] [PATCH 00/34] OCFS2: Add trace event and replace mlog(0) Tao Ma
2010-12-23 8:44 ` Tao Ma
2010-12-31 12:52 ` Joel Becker
2010-12-31 15:11 ` Tao Ma
2010-12-31 22:39 ` Joel Becker
2011-01-04 9:06 ` Tao Ma
2011-01-04 18:43 ` Sunil Mushran
2011-01-04 22:15 ` Joel Becker
2011-01-04 22:33 ` Sunil Mushran
2011-01-05 2:25 ` Tao Ma
2010-12-31 13:10 ` Christoph Hellwig
2010-12-31 13:14 ` Joel Becker
2010-12-31 13:18 ` Christoph Hellwig
2011-02-14 2:53 ` Tao Ma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1293089477-5019-8-git-send-email-tm@tao.ma \
--to=tm@tao.ma \
--cc=ocfs2-devel@oss.oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).