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/dir.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/dir.c')
-rw-r--r-- | fs/ocfs2/dir.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c index 2c983f083f8a..2fc6c3673bea 100644 --- a/fs/ocfs2/dir.c +++ b/fs/ocfs2/dir.c | |||
@@ -400,7 +400,7 @@ static int inline ocfs2_search_dirblock(struct buffer_head *bh, | |||
400 | } | 400 | } |
401 | 401 | ||
402 | bail: | 402 | bail: |
403 | mlog_exit(ret); | 403 | mlog(0, "ret = %d\n", ret); |
404 | return ret; | 404 | return ret; |
405 | } | 405 | } |
406 | 406 | ||
@@ -784,7 +784,7 @@ cleanup_and_exit: | |||
784 | for (; ra_ptr < ra_max; ra_ptr++) | 784 | for (; ra_ptr < ra_max; ra_ptr++) |
785 | brelse(bh_use[ra_ptr]); | 785 | brelse(bh_use[ra_ptr]); |
786 | 786 | ||
787 | mlog_exit_ptr(ret); | 787 | mlog(0, "ret = %p\n", ret); |
788 | return ret; | 788 | return ret; |
789 | } | 789 | } |
790 | 790 | ||
@@ -1198,7 +1198,6 @@ static int __ocfs2_delete_entry(handle_t *handle, struct inode *dir, | |||
1198 | de = (struct ocfs2_dir_entry *)((char *)de + le16_to_cpu(de->rec_len)); | 1198 | de = (struct ocfs2_dir_entry *)((char *)de + le16_to_cpu(de->rec_len)); |
1199 | } | 1199 | } |
1200 | bail: | 1200 | bail: |
1201 | mlog_exit(status); | ||
1202 | return status; | 1201 | return status; |
1203 | } | 1202 | } |
1204 | 1203 | ||
@@ -1759,8 +1758,9 @@ int __ocfs2_add_entry(handle_t *handle, | |||
1759 | * from ever getting here. */ | 1758 | * from ever getting here. */ |
1760 | retval = -ENOSPC; | 1759 | retval = -ENOSPC; |
1761 | bail: | 1760 | bail: |
1761 | if (retval) | ||
1762 | mlog_errno(retval); | ||
1762 | 1763 | ||
1763 | mlog_exit(retval); | ||
1764 | return retval; | 1764 | return retval; |
1765 | } | 1765 | } |
1766 | 1766 | ||
@@ -2045,9 +2045,10 @@ int ocfs2_readdir(struct file * filp, void * dirent, filldir_t filldir) | |||
2045 | dirent, filldir, NULL); | 2045 | dirent, filldir, NULL); |
2046 | 2046 | ||
2047 | ocfs2_inode_unlock(inode, lock_level); | 2047 | ocfs2_inode_unlock(inode, lock_level); |
2048 | if (error) | ||
2049 | mlog_errno(error); | ||
2048 | 2050 | ||
2049 | bail_nolock: | 2051 | bail_nolock: |
2050 | mlog_exit(error); | ||
2051 | 2052 | ||
2052 | return error; | 2053 | return error; |
2053 | } | 2054 | } |
@@ -2119,7 +2120,8 @@ int ocfs2_check_dir_for_entry(struct inode *dir, | |||
2119 | bail: | 2120 | bail: |
2120 | ocfs2_free_dir_lookup_result(&lookup); | 2121 | ocfs2_free_dir_lookup_result(&lookup); |
2121 | 2122 | ||
2122 | mlog_exit(ret); | 2123 | if (ret) |
2124 | mlog_errno(ret); | ||
2123 | return ret; | 2125 | return ret; |
2124 | } | 2126 | } |
2125 | 2127 | ||
@@ -2372,7 +2374,6 @@ static int ocfs2_fill_new_dir_el(struct ocfs2_super *osb, | |||
2372 | bail: | 2374 | bail: |
2373 | brelse(new_bh); | 2375 | brelse(new_bh); |
2374 | 2376 | ||
2375 | mlog_exit(status); | ||
2376 | return status; | 2377 | return status; |
2377 | } | 2378 | } |
2378 | 2379 | ||
@@ -3227,7 +3228,6 @@ static int ocfs2_do_extend_dir(struct super_block *sb, | |||
3227 | bail: | 3228 | bail: |
3228 | if (did_quota && status < 0) | 3229 | if (did_quota && status < 0) |
3229 | dquot_free_space_nodirty(dir, ocfs2_clusters_to_bytes(sb, 1)); | 3230 | dquot_free_space_nodirty(dir, ocfs2_clusters_to_bytes(sb, 1)); |
3230 | mlog_exit(status); | ||
3231 | return status; | 3231 | return status; |
3232 | } | 3232 | } |
3233 | 3233 | ||
@@ -3426,7 +3426,6 @@ bail: | |||
3426 | 3426 | ||
3427 | brelse(new_bh); | 3427 | brelse(new_bh); |
3428 | 3428 | ||
3429 | mlog_exit(status); | ||
3430 | return status; | 3429 | return status; |
3431 | } | 3430 | } |
3432 | 3431 | ||
@@ -3573,8 +3572,9 @@ next: | |||
3573 | status = 0; | 3572 | status = 0; |
3574 | bail: | 3573 | bail: |
3575 | brelse(bh); | 3574 | brelse(bh); |
3575 | if (status) | ||
3576 | mlog_errno(status); | ||
3576 | 3577 | ||
3577 | mlog_exit(status); | ||
3578 | return status; | 3578 | return status; |
3579 | } | 3579 | } |
3580 | 3580 | ||