diff options
author | Tao Ma <boyu.mt@taobao.com> | 2011-02-23 09:19:12 -0500 |
---|---|---|
committer | Tao Ma <boyu.mt@taobao.com> | 2011-02-23 09:19:12 -0500 |
commit | 1db986a839d8acf8ad809c876f1154f2e672d3af (patch) | |
tree | 76c68953717ec0e876303a8ce01fb6888d4f4a25 /fs/ocfs2 | |
parent | 38877a43795d3a834fad827f3d6532ff649e5c45 (diff) |
ocfs2: Remove masklog ML_QUOTA.
Remove mlog(0) from fs/ocfs2/quota_global.c and
the masklog QUOTA.
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/cluster/masklog.c | 1 | ||||
-rw-r--r-- | fs/ocfs2/cluster/masklog.h | 1 | ||||
-rw-r--r-- | fs/ocfs2/ocfs2_trace.h | 78 | ||||
-rw-r--r-- | fs/ocfs2/quota_global.c | 24 |
4 files changed, 90 insertions, 14 deletions
diff --git a/fs/ocfs2/cluster/masklog.c b/fs/ocfs2/cluster/masklog.c index 39f2a46810d1..90ed4c0ce180 100644 --- a/fs/ocfs2/cluster/masklog.c +++ b/fs/ocfs2/cluster/masklog.c | |||
@@ -102,7 +102,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = { | |||
102 | define_mask(CONN), | 102 | define_mask(CONN), |
103 | define_mask(QUORUM), | 103 | define_mask(QUORUM), |
104 | define_mask(EXPORT), | 104 | define_mask(EXPORT), |
105 | define_mask(QUOTA), | ||
106 | define_mask(BASTS), | 105 | define_mask(BASTS), |
107 | define_mask(CLUSTER), | 106 | define_mask(CLUSTER), |
108 | define_mask(ERROR), | 107 | define_mask(ERROR), |
diff --git a/fs/ocfs2/cluster/masklog.h b/fs/ocfs2/cluster/masklog.h index c36b4d8d5aa9..0e65bae257d6 100644 --- a/fs/ocfs2/cluster/masklog.h +++ b/fs/ocfs2/cluster/masklog.h | |||
@@ -104,7 +104,6 @@ | |||
104 | #define ML_CONN 0x0000000004000000ULL /* net connection management */ | 104 | #define ML_CONN 0x0000000004000000ULL /* net connection management */ |
105 | #define ML_QUORUM 0x0000000008000000ULL /* net connection quorum */ | 105 | #define ML_QUORUM 0x0000000008000000ULL /* net connection quorum */ |
106 | #define ML_EXPORT 0x0000000010000000ULL /* ocfs2 export operations */ | 106 | #define ML_EXPORT 0x0000000010000000ULL /* ocfs2 export operations */ |
107 | #define ML_QUOTA 0x0000000040000000ULL /* ocfs2 quota operations */ | ||
108 | #define ML_BASTS 0x0000000100000000ULL /* dlmglue asts and basts */ | 107 | #define ML_BASTS 0x0000000100000000ULL /* dlmglue asts and basts */ |
109 | #define ML_CLUSTER 0x0000000400000000ULL /* cluster stack */ | 108 | #define ML_CLUSTER 0x0000000400000000ULL /* cluster stack */ |
110 | 109 | ||
diff --git a/fs/ocfs2/ocfs2_trace.h b/fs/ocfs2/ocfs2_trace.h index dbd1812f5161..0f7165914401 100644 --- a/fs/ocfs2/ocfs2_trace.h +++ b/fs/ocfs2/ocfs2_trace.h | |||
@@ -110,6 +110,25 @@ DEFINE_EVENT(ocfs2__int_int, name, \ | |||
110 | TP_PROTO(int val1, int val2), \ | 110 | TP_PROTO(int val1, int val2), \ |
111 | TP_ARGS(val1, val2)) | 111 | TP_ARGS(val1, val2)) |
112 | 112 | ||
113 | DECLARE_EVENT_CLASS(ocfs2__uint_int, | ||
114 | TP_PROTO(unsigned int value1, int value2), | ||
115 | TP_ARGS(value1, value2), | ||
116 | TP_STRUCT__entry( | ||
117 | __field(unsigned int, value1) | ||
118 | __field(int, value2) | ||
119 | ), | ||
120 | TP_fast_assign( | ||
121 | __entry->value1 = value1; | ||
122 | __entry->value2 = value2; | ||
123 | ), | ||
124 | TP_printk("%u %d", __entry->value1, __entry->value2) | ||
125 | ); | ||
126 | |||
127 | #define DEFINE_OCFS2_UINT_INT_EVENT(name) \ | ||
128 | DEFINE_EVENT(ocfs2__uint_int, name, \ | ||
129 | TP_PROTO(unsigned int val1, int val2), \ | ||
130 | TP_ARGS(val1, val2)) | ||
131 | |||
113 | DECLARE_EVENT_CLASS(ocfs2__uint_uint, | 132 | DECLARE_EVENT_CLASS(ocfs2__uint_uint, |
114 | TP_PROTO(unsigned int value1, unsigned int value2), | 133 | TP_PROTO(unsigned int value1, unsigned int value2), |
115 | TP_ARGS(value1, value2), | 134 | TP_ARGS(value1, value2), |
@@ -1935,6 +1954,65 @@ DEFINE_OCFS2_INT_EVENT(ocfs2_finish_quota_recovery); | |||
1935 | DEFINE_OCFS2_ULL_ULL_UINT_EVENT(olq_set_dquot); | 1954 | DEFINE_OCFS2_ULL_ULL_UINT_EVENT(olq_set_dquot); |
1936 | 1955 | ||
1937 | /* End of trace events for fs/ocfs2/quota_local.c. */ | 1956 | /* End of trace events for fs/ocfs2/quota_local.c. */ |
1957 | |||
1958 | /* Trace events for fs/ocfs2/quota_global.c. */ | ||
1959 | |||
1960 | DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_quota_block); | ||
1961 | |||
1962 | TRACE_EVENT(ocfs2_sync_dquot, | ||
1963 | TP_PROTO(unsigned int dq_id, long long dqb_curspace, | ||
1964 | long long spacechange, long long curinodes, | ||
1965 | long long inodechange), | ||
1966 | TP_ARGS(dq_id, dqb_curspace, spacechange, curinodes, inodechange), | ||
1967 | TP_STRUCT__entry( | ||
1968 | __field(unsigned int, dq_id) | ||
1969 | __field(long long, dqb_curspace) | ||
1970 | __field(long long, spacechange) | ||
1971 | __field(long long, curinodes) | ||
1972 | __field(long long, inodechange) | ||
1973 | ), | ||
1974 | TP_fast_assign( | ||
1975 | __entry->dq_id = dq_id; | ||
1976 | __entry->dqb_curspace = dqb_curspace; | ||
1977 | __entry->spacechange = spacechange; | ||
1978 | __entry->curinodes = curinodes; | ||
1979 | __entry->inodechange = inodechange; | ||
1980 | ), | ||
1981 | TP_printk("%u %lld %lld %lld %lld", __entry->dq_id, | ||
1982 | __entry->dqb_curspace, __entry->spacechange, | ||
1983 | __entry->curinodes, __entry->inodechange) | ||
1984 | ); | ||
1985 | |||
1986 | TRACE_EVENT(ocfs2_sync_dquot_helper, | ||
1987 | TP_PROTO(unsigned int dq_id, unsigned int dq_type, unsigned long type, | ||
1988 | const char *s_id), | ||
1989 | TP_ARGS(dq_id, dq_type, type, s_id), | ||
1990 | |||
1991 | TP_STRUCT__entry( | ||
1992 | __field(unsigned int, dq_id) | ||
1993 | __field(unsigned int, dq_type) | ||
1994 | __field(unsigned long, type) | ||
1995 | __string(s_id, s_id) | ||
1996 | ), | ||
1997 | TP_fast_assign( | ||
1998 | __entry->dq_id = dq_id; | ||
1999 | __entry->dq_type = dq_type; | ||
2000 | __entry->type = type; | ||
2001 | __assign_str(s_id, s_id); | ||
2002 | ), | ||
2003 | TP_printk("%u %u %lu %s", __entry->dq_id, __entry->dq_type, | ||
2004 | __entry->type, __get_str(s_id)) | ||
2005 | ); | ||
2006 | |||
2007 | DEFINE_OCFS2_UINT_INT_EVENT(ocfs2_write_dquot); | ||
2008 | |||
2009 | DEFINE_OCFS2_UINT_INT_EVENT(ocfs2_release_dquot); | ||
2010 | |||
2011 | DEFINE_OCFS2_UINT_INT_EVENT(ocfs2_acquire_dquot); | ||
2012 | |||
2013 | DEFINE_OCFS2_UINT_INT_EVENT(ocfs2_mark_dquot_dirty); | ||
2014 | |||
2015 | /* End of trace events for fs/ocfs2/quota_global.c. */ | ||
1938 | #endif /* _TRACE_OCFS2_H */ | 2016 | #endif /* _TRACE_OCFS2_H */ |
1939 | 2017 | ||
1940 | /* This part must be outside protection */ | 2018 | /* This part must be outside protection */ |
diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c index 10a49e8a5f03..64346f836c09 100644 --- a/fs/ocfs2/quota_global.c +++ b/fs/ocfs2/quota_global.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/writeback.h> | 11 | #include <linux/writeback.h> |
12 | #include <linux/workqueue.h> | 12 | #include <linux/workqueue.h> |
13 | 13 | ||
14 | #define MLOG_MASK_PREFIX ML_QUOTA | ||
15 | #include <cluster/masklog.h> | 14 | #include <cluster/masklog.h> |
16 | 15 | ||
17 | #include "ocfs2_fs.h" | 16 | #include "ocfs2_fs.h" |
@@ -27,6 +26,7 @@ | |||
27 | #include "super.h" | 26 | #include "super.h" |
28 | #include "buffer_head_io.h" | 27 | #include "buffer_head_io.h" |
29 | #include "quota.h" | 28 | #include "quota.h" |
29 | #include "ocfs2_trace.h" | ||
30 | 30 | ||
31 | /* | 31 | /* |
32 | * Locking of quotas with OCFS2 is rather complex. Here are rules that | 32 | * Locking of quotas with OCFS2 is rather complex. Here are rules that |
@@ -132,8 +132,7 @@ int ocfs2_validate_quota_block(struct super_block *sb, struct buffer_head *bh) | |||
132 | struct ocfs2_disk_dqtrailer *dqt = | 132 | struct ocfs2_disk_dqtrailer *dqt = |
133 | ocfs2_block_dqtrailer(sb->s_blocksize, bh->b_data); | 133 | ocfs2_block_dqtrailer(sb->s_blocksize, bh->b_data); |
134 | 134 | ||
135 | mlog(0, "Validating quota block %llu\n", | 135 | trace_ocfs2_validate_quota_block((unsigned long long)bh->b_blocknr); |
136 | (unsigned long long)bh->b_blocknr); | ||
137 | 136 | ||
138 | BUG_ON(!buffer_uptodate(bh)); | 137 | BUG_ON(!buffer_uptodate(bh)); |
139 | 138 | ||
@@ -509,9 +508,10 @@ int __ocfs2_sync_dquot(struct dquot *dquot, int freeing) | |||
509 | olditime = dquot->dq_dqb.dqb_itime; | 508 | olditime = dquot->dq_dqb.dqb_itime; |
510 | oldbtime = dquot->dq_dqb.dqb_btime; | 509 | oldbtime = dquot->dq_dqb.dqb_btime; |
511 | ocfs2_global_disk2memdqb(dquot, &dqblk); | 510 | ocfs2_global_disk2memdqb(dquot, &dqblk); |
512 | mlog(0, "Syncing global dquot %u space %lld+%lld, inodes %lld+%lld\n", | 511 | trace_ocfs2_sync_dquot(dquot->dq_id, dquot->dq_dqb.dqb_curspace, |
513 | dquot->dq_id, dquot->dq_dqb.dqb_curspace, (long long)spacechange, | 512 | (long long)spacechange, |
514 | dquot->dq_dqb.dqb_curinodes, (long long)inodechange); | 513 | dquot->dq_dqb.dqb_curinodes, |
514 | (long long)inodechange); | ||
515 | if (!test_bit(DQ_LASTSET_B + QIF_SPACE_B, &dquot->dq_flags)) | 515 | if (!test_bit(DQ_LASTSET_B + QIF_SPACE_B, &dquot->dq_flags)) |
516 | dquot->dq_dqb.dqb_curspace += spacechange; | 516 | dquot->dq_dqb.dqb_curspace += spacechange; |
517 | if (!test_bit(DQ_LASTSET_B + QIF_INODES_B, &dquot->dq_flags)) | 517 | if (!test_bit(DQ_LASTSET_B + QIF_INODES_B, &dquot->dq_flags)) |
@@ -595,8 +595,8 @@ static int ocfs2_sync_dquot_helper(struct dquot *dquot, unsigned long type) | |||
595 | struct ocfs2_super *osb = OCFS2_SB(sb); | 595 | struct ocfs2_super *osb = OCFS2_SB(sb); |
596 | int status = 0; | 596 | int status = 0; |
597 | 597 | ||
598 | mlog(0, "id=%u qtype=%u type=%lu device=%s\n", dquot->dq_id, | 598 | trace_ocfs2_sync_dquot_helper(dquot->dq_id, dquot->dq_type, |
599 | dquot->dq_type, type, sb->s_id); | 599 | type, sb->s_id); |
600 | if (type != dquot->dq_type) | 600 | if (type != dquot->dq_type) |
601 | goto out; | 601 | goto out; |
602 | status = ocfs2_lock_global_qf(oinfo, 1); | 602 | status = ocfs2_lock_global_qf(oinfo, 1); |
@@ -647,7 +647,7 @@ static int ocfs2_write_dquot(struct dquot *dquot) | |||
647 | struct ocfs2_super *osb = OCFS2_SB(dquot->dq_sb); | 647 | struct ocfs2_super *osb = OCFS2_SB(dquot->dq_sb); |
648 | int status = 0; | 648 | int status = 0; |
649 | 649 | ||
650 | mlog(0, "id=%u, type=%d", dquot->dq_id, dquot->dq_type); | 650 | trace_ocfs2_write_dquot(dquot->dq_id, dquot->dq_type); |
651 | 651 | ||
652 | handle = ocfs2_start_trans(osb, OCFS2_QWRITE_CREDITS); | 652 | handle = ocfs2_start_trans(osb, OCFS2_QWRITE_CREDITS); |
653 | if (IS_ERR(handle)) { | 653 | if (IS_ERR(handle)) { |
@@ -685,7 +685,7 @@ static int ocfs2_release_dquot(struct dquot *dquot) | |||
685 | struct ocfs2_super *osb = OCFS2_SB(dquot->dq_sb); | 685 | struct ocfs2_super *osb = OCFS2_SB(dquot->dq_sb); |
686 | int status = 0; | 686 | int status = 0; |
687 | 687 | ||
688 | mlog(0, "id=%u, type=%d", dquot->dq_id, dquot->dq_type); | 688 | trace_ocfs2_release_dquot(dquot->dq_id, dquot->dq_type); |
689 | 689 | ||
690 | mutex_lock(&dquot->dq_lock); | 690 | mutex_lock(&dquot->dq_lock); |
691 | /* Check whether we are not racing with some other dqget() */ | 691 | /* Check whether we are not racing with some other dqget() */ |
@@ -743,7 +743,7 @@ static int ocfs2_acquire_dquot(struct dquot *dquot) | |||
743 | int need_alloc = ocfs2_global_qinit_alloc(sb, type); | 743 | int need_alloc = ocfs2_global_qinit_alloc(sb, type); |
744 | handle_t *handle; | 744 | handle_t *handle; |
745 | 745 | ||
746 | mlog(0, "id=%u, type=%d", dquot->dq_id, type); | 746 | trace_ocfs2_acquire_dquot(dquot->dq_id, type); |
747 | mutex_lock(&dquot->dq_lock); | 747 | mutex_lock(&dquot->dq_lock); |
748 | /* | 748 | /* |
749 | * We need an exclusive lock, because we're going to update use count | 749 | * We need an exclusive lock, because we're going to update use count |
@@ -830,7 +830,7 @@ static int ocfs2_mark_dquot_dirty(struct dquot *dquot) | |||
830 | handle_t *handle; | 830 | handle_t *handle; |
831 | struct ocfs2_super *osb = OCFS2_SB(sb); | 831 | struct ocfs2_super *osb = OCFS2_SB(sb); |
832 | 832 | ||
833 | mlog(0, "id=%u, type=%d", dquot->dq_id, type); | 833 | trace_ocfs2_mark_dquot_dirty(dquot->dq_id, type); |
834 | 834 | ||
835 | /* In case user set some limits, sync dquot immediately to global | 835 | /* In case user set some limits, sync dquot immediately to global |
836 | * quota file so that information propagates quicker */ | 836 | * quota file so that information propagates quicker */ |