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/file.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/file.c')
-rw-r--r-- | fs/ocfs2/file.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 71375d7b7bbe..1e1a93aa0526 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -135,7 +135,6 @@ static int ocfs2_file_open(struct inode *inode, struct file *file) | |||
135 | } | 135 | } |
136 | 136 | ||
137 | leave: | 137 | leave: |
138 | mlog_exit(status); | ||
139 | return status; | 138 | return status; |
140 | } | 139 | } |
141 | 140 | ||
@@ -154,8 +153,6 @@ static int ocfs2_file_release(struct inode *inode, struct file *file) | |||
154 | 153 | ||
155 | ocfs2_free_file_private(inode, file); | 154 | ocfs2_free_file_private(inode, file); |
156 | 155 | ||
157 | mlog_exit(0); | ||
158 | |||
159 | return 0; | 156 | return 0; |
160 | } | 157 | } |
161 | 158 | ||
@@ -195,7 +192,8 @@ static int ocfs2_sync_file(struct file *file, int datasync) | |||
195 | err = jbd2_journal_force_commit(journal); | 192 | err = jbd2_journal_force_commit(journal); |
196 | 193 | ||
197 | bail: | 194 | bail: |
198 | mlog_exit(err); | 195 | if (err) |
196 | mlog_errno(err); | ||
199 | 197 | ||
200 | return (err < 0) ? -EIO : 0; | 198 | return (err < 0) ? -EIO : 0; |
201 | } | 199 | } |
@@ -278,7 +276,6 @@ int ocfs2_update_inode_atime(struct inode *inode, | |||
278 | out_commit: | 276 | out_commit: |
279 | ocfs2_commit_trans(OCFS2_SB(inode->i_sb), handle); | 277 | ocfs2_commit_trans(OCFS2_SB(inode->i_sb), handle); |
280 | out: | 278 | out: |
281 | mlog_exit(ret); | ||
282 | return ret; | 279 | return ret; |
283 | } | 280 | } |
284 | 281 | ||
@@ -300,7 +297,6 @@ static int ocfs2_set_inode_size(handle_t *handle, | |||
300 | } | 297 | } |
301 | 298 | ||
302 | bail: | 299 | bail: |
303 | mlog_exit(status); | ||
304 | return status; | 300 | return status; |
305 | } | 301 | } |
306 | 302 | ||
@@ -424,8 +420,6 @@ static int ocfs2_orphan_for_truncate(struct ocfs2_super *osb, | |||
424 | out_commit: | 420 | out_commit: |
425 | ocfs2_commit_trans(osb, handle); | 421 | ocfs2_commit_trans(osb, handle); |
426 | out: | 422 | out: |
427 | |||
428 | mlog_exit(status); | ||
429 | return status; | 423 | return status; |
430 | } | 424 | } |
431 | 425 | ||
@@ -520,7 +514,6 @@ bail: | |||
520 | if (!status && OCFS2_I(inode)->ip_clusters == 0) | 514 | if (!status && OCFS2_I(inode)->ip_clusters == 0) |
521 | status = ocfs2_try_remove_refcount_tree(inode, di_bh); | 515 | status = ocfs2_try_remove_refcount_tree(inode, di_bh); |
522 | 516 | ||
523 | mlog_exit(status); | ||
524 | return status; | 517 | return status; |
525 | } | 518 | } |
526 | 519 | ||
@@ -713,7 +706,6 @@ leave: | |||
713 | brelse(bh); | 706 | brelse(bh); |
714 | bh = NULL; | 707 | bh = NULL; |
715 | 708 | ||
716 | mlog_exit(status); | ||
717 | return status; | 709 | return status; |
718 | } | 710 | } |
719 | 711 | ||
@@ -1269,7 +1261,6 @@ bail: | |||
1269 | mlog_errno(status); | 1261 | mlog_errno(status); |
1270 | } | 1262 | } |
1271 | 1263 | ||
1272 | mlog_exit(status); | ||
1273 | return status; | 1264 | return status; |
1274 | } | 1265 | } |
1275 | 1266 | ||
@@ -1295,8 +1286,6 @@ int ocfs2_getattr(struct vfsmount *mnt, | |||
1295 | stat->blksize = osb->s_clustersize; | 1286 | stat->blksize = osb->s_clustersize; |
1296 | 1287 | ||
1297 | bail: | 1288 | bail: |
1298 | mlog_exit(err); | ||
1299 | |||
1300 | return err; | 1289 | return err; |
1301 | } | 1290 | } |
1302 | 1291 | ||
@@ -1318,7 +1307,6 @@ int ocfs2_permission(struct inode *inode, int mask, unsigned int flags) | |||
1318 | 1307 | ||
1319 | ocfs2_inode_unlock(inode, 0); | 1308 | ocfs2_inode_unlock(inode, 0); |
1320 | out: | 1309 | out: |
1321 | mlog_exit(ret); | ||
1322 | return ret; | 1310 | return ret; |
1323 | } | 1311 | } |
1324 | 1312 | ||
@@ -1359,7 +1347,6 @@ static int __ocfs2_write_remove_suid(struct inode *inode, | |||
1359 | out_trans: | 1347 | out_trans: |
1360 | ocfs2_commit_trans(osb, handle); | 1348 | ocfs2_commit_trans(osb, handle); |
1361 | out: | 1349 | out: |
1362 | mlog_exit(ret); | ||
1363 | return ret; | 1350 | return ret; |
1364 | } | 1351 | } |
1365 | 1352 | ||
@@ -2393,7 +2380,6 @@ out_sems: | |||
2393 | 2380 | ||
2394 | if (written) | 2381 | if (written) |
2395 | ret = written; | 2382 | ret = written; |
2396 | mlog_exit(ret); | ||
2397 | return ret; | 2383 | return ret; |
2398 | } | 2384 | } |
2399 | 2385 | ||
@@ -2476,7 +2462,6 @@ static ssize_t ocfs2_file_splice_write(struct pipe_inode_info *pipe, | |||
2476 | balance_dirty_pages_ratelimited_nr(mapping, nr_pages); | 2462 | balance_dirty_pages_ratelimited_nr(mapping, nr_pages); |
2477 | } | 2463 | } |
2478 | 2464 | ||
2479 | mlog_exit(ret); | ||
2480 | return ret; | 2465 | return ret; |
2481 | } | 2466 | } |
2482 | 2467 | ||
@@ -2507,7 +2492,6 @@ static ssize_t ocfs2_file_splice_read(struct file *in, | |||
2507 | ret = generic_file_splice_read(in, ppos, pipe, len, flags); | 2492 | ret = generic_file_splice_read(in, ppos, pipe, len, flags); |
2508 | 2493 | ||
2509 | bail: | 2494 | bail: |
2510 | mlog_exit(ret); | ||
2511 | return ret; | 2495 | return ret; |
2512 | } | 2496 | } |
2513 | 2497 | ||
@@ -2588,7 +2572,6 @@ bail: | |||
2588 | } | 2572 | } |
2589 | if (rw_level != -1) | 2573 | if (rw_level != -1) |
2590 | ocfs2_rw_unlock(inode, rw_level); | 2574 | ocfs2_rw_unlock(inode, rw_level); |
2591 | mlog_exit(ret); | ||
2592 | 2575 | ||
2593 | return ret; | 2576 | return ret; |
2594 | } | 2577 | } |