diff options
author | Tao Ma <boyu.mt@taobao.com> | 2011-02-22 08:33:59 -0500 |
---|---|---|
committer | Tao Ma <boyu.mt@taobao.com> | 2011-02-22 08:33:59 -0500 |
commit | 9558156bcf8e4750d20034e941213273743ed86a (patch) | |
tree | 08896a6c162938d34eade14509b85bb7f2116707 /fs/ocfs2/aops.c | |
parent | 198aac2838731691ca67e15fd8a56f65307d3677 (diff) |
ocfs2: Remove mlog(0) from fs/ocfs2/aops.c
Remove all the "mlog(0," in fs/ocfs2/aops.c.
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Diffstat (limited to 'fs/ocfs2/aops.c')
-rw-r--r-- | fs/ocfs2/aops.c | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 9551518be435..0d44b7701844 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/mpage.h> | 29 | #include <linux/mpage.h> |
30 | #include <linux/quotaops.h> | 30 | #include <linux/quotaops.h> |
31 | 31 | ||
32 | #define MLOG_MASK_PREFIX ML_FILE_IO | ||
33 | #include <cluster/masklog.h> | 32 | #include <cluster/masklog.h> |
34 | 33 | ||
35 | #include "ocfs2.h" | 34 | #include "ocfs2.h" |
@@ -45,6 +44,7 @@ | |||
45 | #include "super.h" | 44 | #include "super.h" |
46 | #include "symlink.h" | 45 | #include "symlink.h" |
47 | #include "refcounttree.h" | 46 | #include "refcounttree.h" |
47 | #include "ocfs2_trace.h" | ||
48 | 48 | ||
49 | #include "buffer_head_io.h" | 49 | #include "buffer_head_io.h" |
50 | 50 | ||
@@ -59,8 +59,9 @@ static int ocfs2_symlink_get_block(struct inode *inode, sector_t iblock, | |||
59 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 59 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
60 | void *kaddr; | 60 | void *kaddr; |
61 | 61 | ||
62 | mlog(0, "(0x%p, %llu, 0x%p, %d)\n", inode, | 62 | trace_ocfs2_symlink_get_block( |
63 | (unsigned long long)iblock, bh_result, create); | 63 | (unsigned long long)OCFS2_I(inode)->ip_blkno, |
64 | (unsigned long long)iblock, bh_result, create); | ||
64 | 65 | ||
65 | BUG_ON(ocfs2_inode_is_fast_symlink(inode)); | 66 | BUG_ON(ocfs2_inode_is_fast_symlink(inode)); |
66 | 67 | ||
@@ -135,8 +136,8 @@ int ocfs2_get_block(struct inode *inode, sector_t iblock, | |||
135 | u64 p_blkno, count, past_eof; | 136 | u64 p_blkno, count, past_eof; |
136 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 137 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
137 | 138 | ||
138 | mlog(0, "(0x%p, %llu, 0x%p, %d)\n", inode, | 139 | trace_ocfs2_get_block((unsigned long long)OCFS2_I(inode)->ip_blkno, |
139 | (unsigned long long)iblock, bh_result, create); | 140 | (unsigned long long)iblock, bh_result, create); |
140 | 141 | ||
141 | if (OCFS2_I(inode)->ip_flags & OCFS2_INODE_SYSTEM_FILE) | 142 | if (OCFS2_I(inode)->ip_flags & OCFS2_INODE_SYSTEM_FILE) |
142 | mlog(ML_NOTICE, "get_block on system inode 0x%p (%lu)\n", | 143 | mlog(ML_NOTICE, "get_block on system inode 0x%p (%lu)\n", |
@@ -198,8 +199,9 @@ int ocfs2_get_block(struct inode *inode, sector_t iblock, | |||
198 | } | 199 | } |
199 | 200 | ||
200 | past_eof = ocfs2_blocks_for_bytes(inode->i_sb, i_size_read(inode)); | 201 | past_eof = ocfs2_blocks_for_bytes(inode->i_sb, i_size_read(inode)); |
201 | mlog(0, "Inode %lu, past_eof = %llu\n", inode->i_ino, | 202 | |
202 | (unsigned long long)past_eof); | 203 | trace_ocfs2_get_block_end((unsigned long long)OCFS2_I(inode)->ip_blkno, |
204 | (unsigned long long)past_eof); | ||
203 | if (create && (iblock >= past_eof)) | 205 | if (create && (iblock >= past_eof)) |
204 | set_buffer_new(bh_result); | 206 | set_buffer_new(bh_result); |
205 | 207 | ||
@@ -276,7 +278,8 @@ static int ocfs2_readpage(struct file *file, struct page *page) | |||
276 | loff_t start = (loff_t)page->index << PAGE_CACHE_SHIFT; | 278 | loff_t start = (loff_t)page->index << PAGE_CACHE_SHIFT; |
277 | int ret, unlock = 1; | 279 | int ret, unlock = 1; |
278 | 280 | ||
279 | mlog(0, "(0x%p, %lu)\n", file, (page ? page->index : 0)); | 281 | trace_ocfs2_readpage((unsigned long long)oi->ip_blkno, |
282 | (page ? page->index : 0)); | ||
280 | 283 | ||
281 | ret = ocfs2_inode_lock_with_page(inode, NULL, 0, page); | 284 | ret = ocfs2_inode_lock_with_page(inode, NULL, 0, page); |
282 | if (ret != 0) { | 285 | if (ret != 0) { |
@@ -393,13 +396,11 @@ out_unlock: | |||
393 | */ | 396 | */ |
394 | static int ocfs2_writepage(struct page *page, struct writeback_control *wbc) | 397 | static int ocfs2_writepage(struct page *page, struct writeback_control *wbc) |
395 | { | 398 | { |
396 | int ret; | 399 | trace_ocfs2_writepage( |
397 | 400 | (unsigned long long)OCFS2_I(page->mapping->host)->ip_blkno, | |
398 | mlog(0, "(0x%p)\n", page); | 401 | page->index); |
399 | |||
400 | ret = block_write_full_page(page, ocfs2_get_block, wbc); | ||
401 | 402 | ||
402 | return ret; | 403 | return block_write_full_page(page, ocfs2_get_block, wbc); |
403 | } | 404 | } |
404 | 405 | ||
405 | /* Taken from ext3. We don't necessarily need the full blown | 406 | /* Taken from ext3. We don't necessarily need the full blown |
@@ -445,7 +446,8 @@ static sector_t ocfs2_bmap(struct address_space *mapping, sector_t block) | |||
445 | int err = 0; | 446 | int err = 0; |
446 | struct inode *inode = mapping->host; | 447 | struct inode *inode = mapping->host; |
447 | 448 | ||
448 | mlog(0, "(block = %llu)\n", (unsigned long long)block); | 449 | trace_ocfs2_bmap((unsigned long long)OCFS2_I(inode)->ip_blkno, |
450 | (unsigned long long)block); | ||
449 | 451 | ||
450 | /* We don't need to lock journal system files, since they aren't | 452 | /* We don't need to lock journal system files, since they aren't |
451 | * accessed concurrently from multiple nodes. | 453 | * accessed concurrently from multiple nodes. |
@@ -1521,9 +1523,9 @@ static int ocfs2_try_to_write_inline_data(struct address_space *mapping, | |||
1521 | struct ocfs2_inode_info *oi = OCFS2_I(inode); | 1523 | struct ocfs2_inode_info *oi = OCFS2_I(inode); |
1522 | struct ocfs2_dinode *di = NULL; | 1524 | struct ocfs2_dinode *di = NULL; |
1523 | 1525 | ||
1524 | mlog(0, "Inode %llu, write of %u bytes at off %llu. features: 0x%x\n", | 1526 | trace_ocfs2_try_to_write_inline_data((unsigned long long)oi->ip_blkno, |
1525 | (unsigned long long)oi->ip_blkno, len, (unsigned long long)pos, | 1527 | len, (unsigned long long)pos, |
1526 | oi->ip_dyn_features); | 1528 | oi->ip_dyn_features); |
1527 | 1529 | ||
1528 | /* | 1530 | /* |
1529 | * Handle inodes which already have inline data 1st. | 1531 | * Handle inodes which already have inline data 1st. |
@@ -1726,6 +1728,13 @@ try_again: | |||
1726 | 1728 | ||
1727 | di = (struct ocfs2_dinode *)wc->w_di_bh->b_data; | 1729 | di = (struct ocfs2_dinode *)wc->w_di_bh->b_data; |
1728 | 1730 | ||
1731 | trace_ocfs2_write_begin_nolock( | ||
1732 | (unsigned long long)OCFS2_I(inode)->ip_blkno, | ||
1733 | (long long)i_size_read(inode), | ||
1734 | le32_to_cpu(di->i_clusters), | ||
1735 | pos, len, flags, mmap_page, | ||
1736 | clusters_to_alloc, extents_to_split); | ||
1737 | |||
1729 | /* | 1738 | /* |
1730 | * We set w_target_from, w_target_to here so that | 1739 | * We set w_target_from, w_target_to here so that |
1731 | * ocfs2_write_end() knows which range in the target page to | 1740 | * ocfs2_write_end() knows which range in the target page to |
@@ -1738,12 +1747,6 @@ try_again: | |||
1738 | * ocfs2_lock_allocators(). It greatly over-estimates | 1747 | * ocfs2_lock_allocators(). It greatly over-estimates |
1739 | * the work to be done. | 1748 | * the work to be done. |
1740 | */ | 1749 | */ |
1741 | mlog(0, "extend inode %llu, i_size = %lld, di->i_clusters = %u," | ||
1742 | " clusters_to_add = %u, extents_to_split = %u\n", | ||
1743 | (unsigned long long)OCFS2_I(inode)->ip_blkno, | ||
1744 | (long long)i_size_read(inode), le32_to_cpu(di->i_clusters), | ||
1745 | clusters_to_alloc, extents_to_split); | ||
1746 | |||
1747 | ocfs2_init_dinode_extent_tree(&et, INODE_CACHE(inode), | 1750 | ocfs2_init_dinode_extent_tree(&et, INODE_CACHE(inode), |
1748 | wc->w_di_bh); | 1751 | wc->w_di_bh); |
1749 | ret = ocfs2_lock_allocators(inode, &et, | 1752 | ret = ocfs2_lock_allocators(inode, &et, |
@@ -1925,8 +1928,8 @@ static void ocfs2_write_end_inline(struct inode *inode, loff_t pos, | |||
1925 | memcpy(di->id2.i_data.id_data + pos, kaddr + pos, *copied); | 1928 | memcpy(di->id2.i_data.id_data + pos, kaddr + pos, *copied); |
1926 | kunmap_atomic(kaddr, KM_USER0); | 1929 | kunmap_atomic(kaddr, KM_USER0); |
1927 | 1930 | ||
1928 | mlog(0, "Data written to inode at offset %llu. " | 1931 | trace_ocfs2_write_end_inline( |
1929 | "id_count = %u, copied = %u, i_dyn_features = 0x%x\n", | 1932 | (unsigned long long)OCFS2_I(inode)->ip_blkno, |
1930 | (unsigned long long)pos, *copied, | 1933 | (unsigned long long)pos, *copied, |
1931 | le16_to_cpu(di->id2.i_data.id_count), | 1934 | le16_to_cpu(di->id2.i_data.id_count), |
1932 | le16_to_cpu(di->i_dyn_features)); | 1935 | le16_to_cpu(di->i_dyn_features)); |