diff options
author | Tao Ma <boyu.mt@taobao.com> | 2011-02-24 03:09:38 -0500 |
---|---|---|
committer | Tao Ma <boyu.mt@taobao.com> | 2011-02-24 03:09:38 -0500 |
commit | 15057e981abb3436c16835af1001447056a809b5 (patch) | |
tree | 331f678020329bf08aabf3208004d1c60192b115 /fs | |
parent | b41079504c786eb226e7e1e3dc5cc1f37fbd1c2b (diff) |
ocfs2: Remove masklog ML_BH_IO.
Remove mlog(0,...) and mlog(ML_BH_IO,...) from
fs/ocfs2/buffer_head_io.c.
The masklog BH_IO is removed finally.
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ocfs2/buffer_head_io.c | 37 | ||||
-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 | 46 |
4 files changed, 59 insertions, 26 deletions
diff --git a/fs/ocfs2/buffer_head_io.c b/fs/ocfs2/buffer_head_io.c index c23846dbfc8f..d1cf9abcd827 100644 --- a/fs/ocfs2/buffer_head_io.c +++ b/fs/ocfs2/buffer_head_io.c | |||
@@ -35,8 +35,8 @@ | |||
35 | #include "inode.h" | 35 | #include "inode.h" |
36 | #include "journal.h" | 36 | #include "journal.h" |
37 | #include "uptodate.h" | 37 | #include "uptodate.h" |
38 | |||
39 | #include "buffer_head_io.h" | 38 | #include "buffer_head_io.h" |
39 | #include "ocfs2_trace.h" | ||
40 | 40 | ||
41 | /* | 41 | /* |
42 | * Bits on bh->b_state used by ocfs2. | 42 | * Bits on bh->b_state used by ocfs2. |
@@ -55,8 +55,7 @@ int ocfs2_write_block(struct ocfs2_super *osb, struct buffer_head *bh, | |||
55 | { | 55 | { |
56 | int ret = 0; | 56 | int ret = 0; |
57 | 57 | ||
58 | mlog(0, "(bh->b_blocknr = %llu, ci=%p)\n", | 58 | trace_ocfs2_write_block((unsigned long long)bh->b_blocknr, ci); |
59 | (unsigned long long)bh->b_blocknr, ci); | ||
60 | 59 | ||
61 | BUG_ON(bh->b_blocknr < OCFS2_SUPER_BLOCK_BLKNO); | 60 | BUG_ON(bh->b_blocknr < OCFS2_SUPER_BLOCK_BLKNO); |
62 | BUG_ON(buffer_jbd(bh)); | 61 | BUG_ON(buffer_jbd(bh)); |
@@ -107,10 +106,10 @@ int ocfs2_read_blocks_sync(struct ocfs2_super *osb, u64 block, | |||
107 | unsigned int i; | 106 | unsigned int i; |
108 | struct buffer_head *bh; | 107 | struct buffer_head *bh; |
109 | 108 | ||
110 | if (!nr) { | 109 | trace_ocfs2_read_blocks_sync((unsigned long long)block, nr); |
111 | mlog(ML_BH_IO, "No buffers will be read!\n"); | 110 | |
111 | if (!nr) | ||
112 | goto bail; | 112 | goto bail; |
113 | } | ||
114 | 113 | ||
115 | for (i = 0 ; i < nr ; i++) { | 114 | for (i = 0 ; i < nr ; i++) { |
116 | if (bhs[i] == NULL) { | 115 | if (bhs[i] == NULL) { |
@@ -124,10 +123,8 @@ int ocfs2_read_blocks_sync(struct ocfs2_super *osb, u64 block, | |||
124 | bh = bhs[i]; | 123 | bh = bhs[i]; |
125 | 124 | ||
126 | if (buffer_jbd(bh)) { | 125 | if (buffer_jbd(bh)) { |
127 | mlog(ML_BH_IO, | 126 | trace_ocfs2_read_blocks_sync_jbd( |
128 | "trying to sync read a jbd " | 127 | (unsigned long long)bh->b_blocknr); |
129 | "managed bh (blocknr = %llu), skipping\n", | ||
130 | (unsigned long long)bh->b_blocknr); | ||
131 | continue; | 128 | continue; |
132 | } | 129 | } |
133 | 130 | ||
@@ -187,8 +184,7 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr, | |||
187 | struct buffer_head *bh; | 184 | struct buffer_head *bh; |
188 | struct super_block *sb = ocfs2_metadata_cache_get_super(ci); | 185 | struct super_block *sb = ocfs2_metadata_cache_get_super(ci); |
189 | 186 | ||
190 | mlog(0, "(ci=%p, block=(%llu), nr=(%d), flags=%d)\n", | 187 | trace_ocfs2_read_blocks_begin(ci, (unsigned long long)block, nr, flags); |
191 | ci, (unsigned long long)block, nr, flags); | ||
192 | 188 | ||
193 | BUG_ON(!ci); | 189 | BUG_ON(!ci); |
194 | BUG_ON((flags & OCFS2_BH_READAHEAD) && | 190 | BUG_ON((flags & OCFS2_BH_READAHEAD) && |
@@ -208,7 +204,6 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr, | |||
208 | } | 204 | } |
209 | 205 | ||
210 | if (nr == 0) { | 206 | if (nr == 0) { |
211 | mlog(ML_BH_IO, "No buffers will be read!\n"); | ||
212 | status = 0; | 207 | status = 0; |
213 | goto bail; | 208 | goto bail; |
214 | } | 209 | } |
@@ -261,11 +256,10 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr, | |||
261 | ignore_cache = 1; | 256 | ignore_cache = 1; |
262 | } | 257 | } |
263 | 258 | ||
259 | trace_ocfs2_read_blocks_bh((unsigned long long)bh->b_blocknr, | ||
260 | ignore_cache, buffer_jbd(bh), buffer_dirty(bh)); | ||
261 | |||
264 | if (buffer_jbd(bh)) { | 262 | if (buffer_jbd(bh)) { |
265 | if (ignore_cache) | ||
266 | mlog(ML_BH_IO, "trying to sync read a jbd " | ||
267 | "managed bh (blocknr = %llu)\n", | ||
268 | (unsigned long long)bh->b_blocknr); | ||
269 | continue; | 263 | continue; |
270 | } | 264 | } |
271 | 265 | ||
@@ -273,9 +267,6 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr, | |||
273 | if (buffer_dirty(bh)) { | 267 | if (buffer_dirty(bh)) { |
274 | /* This should probably be a BUG, or | 268 | /* This should probably be a BUG, or |
275 | * at least return an error. */ | 269 | * at least return an error. */ |
276 | mlog(ML_BH_IO, "asking me to sync read a dirty " | ||
277 | "buffer! (blocknr = %llu)\n", | ||
278 | (unsigned long long)bh->b_blocknr); | ||
279 | continue; | 270 | continue; |
280 | } | 271 | } |
281 | 272 | ||
@@ -368,10 +359,8 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr, | |||
368 | } | 359 | } |
369 | ocfs2_metadata_cache_io_unlock(ci); | 360 | ocfs2_metadata_cache_io_unlock(ci); |
370 | 361 | ||
371 | mlog(ML_BH_IO, "block=(%llu), nr=(%d), cached=%s, flags=0x%x\n", | 362 | trace_ocfs2_read_blocks_end((unsigned long long)block, nr, |
372 | (unsigned long long)block, nr, | 363 | flags, ignore_cache); |
373 | ((flags & OCFS2_BH_IGNORE_CACHE) || ignore_cache) ? "no" : "yes", | ||
374 | flags); | ||
375 | 364 | ||
376 | bail: | 365 | bail: |
377 | 366 | ||
diff --git a/fs/ocfs2/cluster/masklog.c b/fs/ocfs2/cluster/masklog.c index b64fb67c2999..d845ccef2408 100644 --- a/fs/ocfs2/cluster/masklog.c +++ b/fs/ocfs2/cluster/masklog.c | |||
@@ -93,7 +93,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = { | |||
93 | define_mask(DLM_RECOVERY), | 93 | define_mask(DLM_RECOVERY), |
94 | define_mask(AIO), | 94 | define_mask(AIO), |
95 | define_mask(DLM_GLUE), | 95 | define_mask(DLM_GLUE), |
96 | define_mask(BH_IO), | ||
97 | define_mask(UPTODATE), | 96 | define_mask(UPTODATE), |
98 | define_mask(VOTE), | 97 | define_mask(VOTE), |
99 | define_mask(CONN), | 98 | define_mask(CONN), |
diff --git a/fs/ocfs2/cluster/masklog.h b/fs/ocfs2/cluster/masklog.h index 1340ef0ae3e1..ad267f614528 100644 --- a/fs/ocfs2/cluster/masklog.h +++ b/fs/ocfs2/cluster/masklog.h | |||
@@ -95,7 +95,6 @@ | |||
95 | #define ML_DLM_RECOVERY 0x0000000000001000ULL /* dlm master functions */ | 95 | #define ML_DLM_RECOVERY 0x0000000000001000ULL /* dlm master functions */ |
96 | #define ML_AIO 0x0000000000002000ULL /* ocfs2 aio read and write */ | 96 | #define ML_AIO 0x0000000000002000ULL /* ocfs2 aio read and write */ |
97 | #define ML_DLM_GLUE 0x0000000000080000ULL /* ocfs2 dlm glue layer */ | 97 | #define ML_DLM_GLUE 0x0000000000080000ULL /* ocfs2 dlm glue layer */ |
98 | #define ML_BH_IO 0x0000000000100000ULL /* ocfs2 buffer I/O */ | ||
99 | #define ML_UPTODATE 0x0000000000200000ULL /* ocfs2 caching sequence #'s */ | 98 | #define ML_UPTODATE 0x0000000000200000ULL /* ocfs2 caching sequence #'s */ |
100 | #define ML_VOTE 0x0000000001000000ULL /* ocfs2 node messaging */ | 99 | #define ML_VOTE 0x0000000001000000ULL /* ocfs2 node messaging */ |
101 | #define ML_CONN 0x0000000004000000ULL /* net connection management */ | 100 | #define ML_CONN 0x0000000004000000ULL /* net connection management */ |
diff --git a/fs/ocfs2/ocfs2_trace.h b/fs/ocfs2/ocfs2_trace.h index 9d1ca49aa98b..90dc79a22a59 100644 --- a/fs/ocfs2/ocfs2_trace.h +++ b/fs/ocfs2/ocfs2_trace.h | |||
@@ -2642,6 +2642,52 @@ DEFINE_OCFS2_ULL_EVENT(ocfs2_recover_orphans_iput); | |||
2642 | DEFINE_OCFS2_INT_EVENT(ocfs2_wait_on_mount); | 2642 | DEFINE_OCFS2_INT_EVENT(ocfs2_wait_on_mount); |
2643 | 2643 | ||
2644 | /* End of trace events for fs/ocfs2/journal.c. */ | 2644 | /* End of trace events for fs/ocfs2/journal.c. */ |
2645 | |||
2646 | /* Trace events for fs/ocfs2/buffer_head_io.c. */ | ||
2647 | |||
2648 | DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_read_blocks_sync); | ||
2649 | |||
2650 | DEFINE_OCFS2_ULL_EVENT(ocfs2_read_blocks_sync_jbd); | ||
2651 | |||
2652 | DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_read_blocks_bh); | ||
2653 | |||
2654 | DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_read_blocks_end); | ||
2655 | |||
2656 | TRACE_EVENT(ocfs2_write_block, | ||
2657 | TP_PROTO(unsigned long long block, void *ci), | ||
2658 | TP_ARGS(block, ci), | ||
2659 | TP_STRUCT__entry( | ||
2660 | __field(unsigned long long, block) | ||
2661 | __field(void *, ci) | ||
2662 | ), | ||
2663 | TP_fast_assign( | ||
2664 | __entry->block = block; | ||
2665 | __entry->ci = ci; | ||
2666 | ), | ||
2667 | TP_printk("%llu %p", __entry->block, __entry->ci) | ||
2668 | ); | ||
2669 | |||
2670 | TRACE_EVENT(ocfs2_read_blocks_begin, | ||
2671 | TP_PROTO(void *ci, unsigned long long block, | ||
2672 | unsigned int nr, int flags), | ||
2673 | TP_ARGS(ci, block, nr, flags), | ||
2674 | TP_STRUCT__entry( | ||
2675 | __field(void *, ci) | ||
2676 | __field(unsigned long long, block) | ||
2677 | __field(unsigned int, nr) | ||
2678 | __field(int, flags) | ||
2679 | ), | ||
2680 | TP_fast_assign( | ||
2681 | __entry->ci = ci; | ||
2682 | __entry->block = block; | ||
2683 | __entry->nr = nr; | ||
2684 | __entry->flags = flags; | ||
2685 | ), | ||
2686 | TP_printk("%p %llu %u %d", __entry->ci, __entry->block, | ||
2687 | __entry->nr, __entry->flags) | ||
2688 | ); | ||
2689 | |||
2690 | /* End of trace events for fs/ocfs2/buffer_head_io.c. */ | ||
2645 | #endif /* _TRACE_OCFS2_H */ | 2691 | #endif /* _TRACE_OCFS2_H */ |
2646 | 2692 | ||
2647 | /* This part must be outside protection */ | 2693 | /* This part must be outside protection */ |