diff options
author | Tao Ma <boyu.mt@taobao.com> | 2011-03-07 03:43:21 -0500 |
---|---|---|
committer | Tao Ma <boyu.mt@taobao.com> | 2011-03-07 03:43:21 -0500 |
commit | c1e8d35ef5ffb393b94a192034b5e3541e005d75 (patch) | |
tree | b9a7f089acd3408c2835a3dfd6aa7bb0407587b3 /fs/ocfs2/aops.c | |
parent | ef6b689b63b9f5227ccee6f16dd9ee3faf58a464 (diff) |
ocfs2: Remove EXIT from masklog.
mlog_exit is used to record the exit status of a function.
But because it is added in so many functions, if we enable it,
the system logs get filled up quickly and cause too much I/O.
So actually no one can open it for a production system or even
for a test.
This patch just try to remove it or change it. So:
1. if all the error paths already use mlog_errno, it is just removed.
Otherwise, it will be replaced by mlog_errno.
2. if it is used to print some return value, it is replaced with
mlog(0,...).
mlog_exit_ptr is changed to mlog(0.
All those mlog(0,...) will be replaced with trace events later.
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Diffstat (limited to 'fs/ocfs2/aops.c')
-rw-r--r-- | fs/ocfs2/aops.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 5dbfc9e45195..9551518be435 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -123,7 +123,6 @@ static int ocfs2_symlink_get_block(struct inode *inode, sector_t iblock, | |||
123 | bail: | 123 | bail: |
124 | brelse(bh); | 124 | brelse(bh); |
125 | 125 | ||
126 | mlog_exit(err); | ||
127 | return err; | 126 | return err; |
128 | } | 127 | } |
129 | 128 | ||
@@ -208,7 +207,6 @@ bail: | |||
208 | if (err < 0) | 207 | if (err < 0) |
209 | err = -EIO; | 208 | err = -EIO; |
210 | 209 | ||
211 | mlog_exit(err); | ||
212 | return err; | 210 | return err; |
213 | } | 211 | } |
214 | 212 | ||
@@ -323,7 +321,6 @@ out_inode_unlock: | |||
323 | out: | 321 | out: |
324 | if (unlock) | 322 | if (unlock) |
325 | unlock_page(page); | 323 | unlock_page(page); |
326 | mlog_exit(ret); | ||
327 | return ret; | 324 | return ret; |
328 | } | 325 | } |
329 | 326 | ||
@@ -402,8 +399,6 @@ static int ocfs2_writepage(struct page *page, struct writeback_control *wbc) | |||
402 | 399 | ||
403 | ret = block_write_full_page(page, ocfs2_get_block, wbc); | 400 | ret = block_write_full_page(page, ocfs2_get_block, wbc); |
404 | 401 | ||
405 | mlog_exit(ret); | ||
406 | |||
407 | return ret; | 402 | return ret; |
408 | } | 403 | } |
409 | 404 | ||
@@ -484,8 +479,6 @@ static sector_t ocfs2_bmap(struct address_space *mapping, sector_t block) | |||
484 | bail: | 479 | bail: |
485 | status = err ? 0 : p_blkno; | 480 | status = err ? 0 : p_blkno; |
486 | 481 | ||
487 | mlog_exit((int)status); | ||
488 | |||
489 | return status; | 482 | return status; |
490 | } | 483 | } |
491 | 484 | ||
@@ -616,7 +609,6 @@ static ssize_t ocfs2_direct_IO(int rw, | |||
616 | { | 609 | { |
617 | struct file *file = iocb->ki_filp; | 610 | struct file *file = iocb->ki_filp; |
618 | struct inode *inode = file->f_path.dentry->d_inode->i_mapping->host; | 611 | struct inode *inode = file->f_path.dentry->d_inode->i_mapping->host; |
619 | int ret; | ||
620 | 612 | ||
621 | /* | 613 | /* |
622 | * Fallback to buffered I/O if we see an inode without | 614 | * Fallback to buffered I/O if we see an inode without |
@@ -629,13 +621,10 @@ static ssize_t ocfs2_direct_IO(int rw, | |||
629 | if (i_size_read(inode) <= offset) | 621 | if (i_size_read(inode) <= offset) |
630 | return 0; | 622 | return 0; |
631 | 623 | ||
632 | ret = __blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, | 624 | return __blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, |
633 | iov, offset, nr_segs, | 625 | iov, offset, nr_segs, |
634 | ocfs2_direct_IO_get_blocks, | 626 | ocfs2_direct_IO_get_blocks, |
635 | ocfs2_dio_end_io, NULL, 0); | 627 | ocfs2_dio_end_io, NULL, 0); |
636 | |||
637 | mlog_exit(ret); | ||
638 | return ret; | ||
639 | } | 628 | } |
640 | 629 | ||
641 | static void ocfs2_figure_cluster_boundaries(struct ocfs2_super *osb, | 630 | static void ocfs2_figure_cluster_boundaries(struct ocfs2_super *osb, |