Commit a8731086eff053b430cddbf5783654dfd700ea06
1 parent
a716357c47
Exists in
master
and in
39 other branches
ocfs2: Remove mlog(0) from fs/ocfs2/slot_map.c
This is the 1st step to remove the debug info of SUPER. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Showing 2 changed files with 16 additions and 8 deletions Side-by-side Diff
fs/ocfs2/ocfs2_trace.h
... | ... | @@ -1519,6 +1519,17 @@ |
1519 | 1519 | |
1520 | 1520 | /* End of trace events for fs/ocfs2/extent_map.c. */ |
1521 | 1521 | |
1522 | +/* Trace events for fs/ocfs2/slot_map.c. */ | |
1523 | + | |
1524 | +DEFINE_OCFS2_UINT_EVENT(ocfs2_refresh_slot_info); | |
1525 | + | |
1526 | +DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_map_slot_buffers); | |
1527 | + | |
1528 | +DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_map_slot_buffers_block); | |
1529 | + | |
1530 | +DEFINE_OCFS2_INT_EVENT(ocfs2_find_slot); | |
1531 | + | |
1532 | +/* End of trace events for fs/ocfs2/slot_map.c. */ | |
1522 | 1533 | #endif /* _TRACE_OCFS2_H */ |
1523 | 1534 | |
1524 | 1535 | /* This part must be outside protection */ |
fs/ocfs2/slot_map.c
... | ... | @@ -27,7 +27,6 @@ |
27 | 27 | #include <linux/slab.h> |
28 | 28 | #include <linux/highmem.h> |
29 | 29 | |
30 | -#define MLOG_MASK_PREFIX ML_SUPER | |
31 | 30 | #include <cluster/masklog.h> |
32 | 31 | |
33 | 32 | #include "ocfs2.h" |
... | ... | @@ -39,6 +38,7 @@ |
39 | 38 | #include "slot_map.h" |
40 | 39 | #include "super.h" |
41 | 40 | #include "sysfile.h" |
41 | +#include "ocfs2_trace.h" | |
42 | 42 | |
43 | 43 | #include "buffer_head_io.h" |
44 | 44 | |
... | ... | @@ -142,8 +142,7 @@ |
142 | 142 | BUG_ON(si->si_blocks == 0); |
143 | 143 | BUG_ON(si->si_bh == NULL); |
144 | 144 | |
145 | - mlog(0, "Refreshing slot map, reading %u block(s)\n", | |
146 | - si->si_blocks); | |
145 | + trace_ocfs2_refresh_slot_info(si->si_blocks); | |
147 | 146 | |
148 | 147 | /* |
149 | 148 | * We pass -1 as blocknr because we expect all of si->si_bh to |
... | ... | @@ -381,8 +380,7 @@ |
381 | 380 | /* The size checks above should ensure this */ |
382 | 381 | BUG_ON((osb->max_slots / si->si_slots_per_block) > blocks); |
383 | 382 | |
384 | - mlog(0, "Slot map needs %u buffers for %llu bytes\n", | |
385 | - si->si_blocks, bytes); | |
383 | + trace_ocfs2_map_slot_buffers(bytes, si->si_blocks); | |
386 | 384 | |
387 | 385 | si->si_bh = kzalloc(sizeof(struct buffer_head *) * si->si_blocks, |
388 | 386 | GFP_KERNEL); |
... | ... | @@ -400,8 +398,7 @@ |
400 | 398 | goto bail; |
401 | 399 | } |
402 | 400 | |
403 | - mlog(0, "Reading slot map block %u at %llu\n", i, | |
404 | - (unsigned long long)blkno); | |
401 | + trace_ocfs2_map_slot_buffers_block((unsigned long long)blkno, i); | |
405 | 402 | |
406 | 403 | bh = NULL; /* Acquire a fresh bh */ |
407 | 404 | status = ocfs2_read_blocks(INODE_CACHE(si->si_inode), blkno, |
... | ... | @@ -503,7 +500,7 @@ |
503 | 500 | osb->slot_num = slot; |
504 | 501 | spin_unlock(&osb->osb_lock); |
505 | 502 | |
506 | - mlog(0, "taking node slot %d\n", osb->slot_num); | |
503 | + trace_ocfs2_find_slot(osb->slot_num); | |
507 | 504 | |
508 | 505 | status = ocfs2_update_disk_slot(osb, si, osb->slot_num); |
509 | 506 | if (status < 0) |