aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ocfs2/ocfs2_trace.h10
-rw-r--r--fs/ocfs2/resize.c12
2 files changed, 17 insertions, 5 deletions
diff --git a/fs/ocfs2/ocfs2_trace.h b/fs/ocfs2/ocfs2_trace.h
index 11980ecba546..335edc50f132 100644
--- a/fs/ocfs2/ocfs2_trace.h
+++ b/fs/ocfs2/ocfs2_trace.h
@@ -590,6 +590,16 @@ DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_local_alloc_new_window_result);
590 590
591/* End of trace events for fs/ocfs2/localalloc.c. */ 591/* End of trace events for fs/ocfs2/localalloc.c. */
592 592
593/* Trace events for fs/ocfs2/resize.c. */
594
595DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_update_last_group_and_inode);
596
597DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_group_extend);
598
599DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_group_add);
600
601/* End of trace events for fs/ocfs2/resize.c. */
602
593/* Trace events for fs/ocfs2/suballoc.c. */ 603/* Trace events for fs/ocfs2/suballoc.c. */
594 604
595DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_group_descriptor); 605DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_group_descriptor);
diff --git a/fs/ocfs2/resize.c b/fs/ocfs2/resize.c
index 76b37909a4a1..761d20da9dcd 100644
--- a/fs/ocfs2/resize.c
+++ b/fs/ocfs2/resize.c
@@ -39,6 +39,7 @@
39#include "super.h" 39#include "super.h"
40#include "sysfile.h" 40#include "sysfile.h"
41#include "uptodate.h" 41#include "uptodate.h"
42#include "ocfs2_trace.h"
42 43
43#include "buffer_head_io.h" 44#include "buffer_head_io.h"
44#include "suballoc.h" 45#include "suballoc.h"
@@ -102,8 +103,8 @@ static int ocfs2_update_last_group_and_inode(handle_t *handle,
102 u16 cl_bpc = le16_to_cpu(cl->cl_bpc); 103 u16 cl_bpc = le16_to_cpu(cl->cl_bpc);
103 u16 cl_cpg = le16_to_cpu(cl->cl_cpg); 104 u16 cl_cpg = le16_to_cpu(cl->cl_cpg);
104 105
105 mlog(0, "(new_clusters=%d, first_new_cluster = %u)\n", 106 trace_ocfs2_update_last_group_and_inode(new_clusters,
106 new_clusters, first_new_cluster); 107 first_new_cluster);
107 108
108 ret = ocfs2_journal_access_gd(handle, INODE_CACHE(bm_inode), 109 ret = ocfs2_journal_access_gd(handle, INODE_CACHE(bm_inode),
109 group_bh, OCFS2_JOURNAL_ACCESS_WRITE); 110 group_bh, OCFS2_JOURNAL_ACCESS_WRITE);
@@ -340,7 +341,8 @@ int ocfs2_group_extend(struct inode * inode, int new_clusters)
340 goto out_unlock; 341 goto out_unlock;
341 } 342 }
342 343
343 mlog(0, "extend the last group at %llu, new clusters = %d\n", 344
345 trace_ocfs2_group_extend(
344 (unsigned long long)le64_to_cpu(group->bg_blkno), new_clusters); 346 (unsigned long long)le64_to_cpu(group->bg_blkno), new_clusters);
345 347
346 handle = ocfs2_start_trans(osb, OCFS2_GROUP_EXTEND_CREDITS); 348 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)
515 goto out_unlock; 517 goto out_unlock;
516 } 518 }
517 519
518 mlog(0, "Add a new group %llu in chain = %u, length = %u\n", 520 trace_ocfs2_group_add((unsigned long long)input->group,
519 (unsigned long long)input->group, input->chain, input->clusters); 521 input->chain, input->clusters, input->frees);
520 522
521 handle = ocfs2_start_trans(osb, OCFS2_GROUP_ADD_CREDITS); 523 handle = ocfs2_start_trans(osb, OCFS2_GROUP_ADD_CREDITS);
522 if (IS_ERR(handle)) { 524 if (IS_ERR(handle)) {