Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 243003
b: refs/heads/master
c: a543870
h: refs/heads/master
i:
  243001: 778c821
  242999: 060cefc
v: v3
  • Loading branch information
Tao Ma committed Feb 22, 2011
1 parent 4f31a2d commit 7fc28a5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2f73e135b83c5001dad84cbd1d445d23fd045b83
refs/heads/master: a5438702ee63b13710c497bb22c7952a7e5d6a52
10 changes: 10 additions & 0 deletions trunk/fs/ocfs2/ocfs2_trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 7 additions & 5 deletions trunk/fs/ocfs2/resize.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit 7fc28a5

Please sign in to comment.