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/journal.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/journal.c')
-rw-r--r-- | fs/ocfs2/journal.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index 7378277b17a4..956509167bf5 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c | |||
@@ -335,7 +335,6 @@ static int ocfs2_commit_cache(struct ocfs2_super *osb) | |||
335 | ocfs2_wake_downconvert_thread(osb); | 335 | ocfs2_wake_downconvert_thread(osb); |
336 | wake_up(&journal->j_checkpointed); | 336 | wake_up(&journal->j_checkpointed); |
337 | finally: | 337 | finally: |
338 | mlog_exit(status); | ||
339 | return status; | 338 | return status; |
340 | } | 339 | } |
341 | 340 | ||
@@ -450,8 +449,6 @@ int ocfs2_extend_trans(handle_t *handle, int nblocks) | |||
450 | 449 | ||
451 | status = 0; | 450 | status = 0; |
452 | bail: | 451 | bail: |
453 | |||
454 | mlog_exit(status); | ||
455 | return status; | 452 | return status; |
456 | } | 453 | } |
457 | 454 | ||
@@ -665,7 +662,6 @@ static int __ocfs2_journal_access(handle_t *handle, | |||
665 | mlog(ML_ERROR, "Error %d getting %d access to buffer!\n", | 662 | mlog(ML_ERROR, "Error %d getting %d access to buffer!\n", |
666 | status, type); | 663 | status, type); |
667 | 664 | ||
668 | mlog_exit(status); | ||
669 | return status; | 665 | return status; |
670 | } | 666 | } |
671 | 667 | ||
@@ -739,8 +735,6 @@ void ocfs2_journal_dirty(handle_t *handle, struct buffer_head *bh) | |||
739 | 735 | ||
740 | status = jbd2_journal_dirty_metadata(handle, bh); | 736 | status = jbd2_journal_dirty_metadata(handle, bh); |
741 | BUG_ON(status); | 737 | BUG_ON(status); |
742 | |||
743 | mlog_exit_void(); | ||
744 | } | 738 | } |
745 | 739 | ||
746 | #define OCFS2_DEFAULT_COMMIT_INTERVAL (HZ * JBD2_DEFAULT_MAX_COMMIT_AGE) | 740 | #define OCFS2_DEFAULT_COMMIT_INTERVAL (HZ * JBD2_DEFAULT_MAX_COMMIT_AGE) |
@@ -854,7 +848,6 @@ done: | |||
854 | } | 848 | } |
855 | } | 849 | } |
856 | 850 | ||
857 | mlog_exit(status); | ||
858 | return status; | 851 | return status; |
859 | } | 852 | } |
860 | 853 | ||
@@ -899,7 +892,6 @@ static int ocfs2_journal_toggle_dirty(struct ocfs2_super *osb, | |||
899 | if (status < 0) | 892 | if (status < 0) |
900 | mlog_errno(status); | 893 | mlog_errno(status); |
901 | 894 | ||
902 | mlog_exit(status); | ||
903 | return status; | 895 | return status; |
904 | } | 896 | } |
905 | 897 | ||
@@ -989,7 +981,6 @@ void ocfs2_journal_shutdown(struct ocfs2_super *osb) | |||
989 | done: | 981 | done: |
990 | if (inode) | 982 | if (inode) |
991 | iput(inode); | 983 | iput(inode); |
992 | mlog_exit_void(); | ||
993 | } | 984 | } |
994 | 985 | ||
995 | static void ocfs2_clear_journal_error(struct super_block *sb, | 986 | static void ocfs2_clear_journal_error(struct super_block *sb, |
@@ -1048,7 +1039,6 @@ int ocfs2_journal_load(struct ocfs2_journal *journal, int local, int replayed) | |||
1048 | osb->commit_task = NULL; | 1039 | osb->commit_task = NULL; |
1049 | 1040 | ||
1050 | done: | 1041 | done: |
1051 | mlog_exit(status); | ||
1052 | return status; | 1042 | return status; |
1053 | } | 1043 | } |
1054 | 1044 | ||
@@ -1072,7 +1062,6 @@ int ocfs2_journal_wipe(struct ocfs2_journal *journal, int full) | |||
1072 | mlog_errno(status); | 1062 | mlog_errno(status); |
1073 | 1063 | ||
1074 | bail: | 1064 | bail: |
1075 | mlog_exit(status); | ||
1076 | return status; | 1065 | return status; |
1077 | } | 1066 | } |
1078 | 1067 | ||
@@ -1146,7 +1135,6 @@ static int ocfs2_force_read_journal(struct inode *inode) | |||
1146 | bail: | 1135 | bail: |
1147 | for(i = 0; i < CONCURRENT_JOURNAL_FILL; i++) | 1136 | for(i = 0; i < CONCURRENT_JOURNAL_FILL; i++) |
1148 | brelse(bhs[i]); | 1137 | brelse(bhs[i]); |
1149 | mlog_exit(status); | ||
1150 | return status; | 1138 | return status; |
1151 | } | 1139 | } |
1152 | 1140 | ||
@@ -1236,7 +1224,6 @@ void ocfs2_complete_recovery(struct work_struct *work) | |||
1236 | } | 1224 | } |
1237 | 1225 | ||
1238 | mlog(0, "Recovery completion\n"); | 1226 | mlog(0, "Recovery completion\n"); |
1239 | mlog_exit_void(); | ||
1240 | } | 1227 | } |
1241 | 1228 | ||
1242 | /* NOTE: This function always eats your references to la_dinode and | 1229 | /* NOTE: This function always eats your references to la_dinode and |
@@ -1432,7 +1419,6 @@ bail: | |||
1432 | if (rm_quota) | 1419 | if (rm_quota) |
1433 | kfree(rm_quota); | 1420 | kfree(rm_quota); |
1434 | 1421 | ||
1435 | mlog_exit(status); | ||
1436 | /* no one is callint kthread_stop() for us so the kthread() api | 1422 | /* no one is callint kthread_stop() for us so the kthread() api |
1437 | * requires that we call do_exit(). And it isn't exported, but | 1423 | * requires that we call do_exit(). And it isn't exported, but |
1438 | * complete_and_exit() seems to be a minimal wrapper around it. */ | 1424 | * complete_and_exit() seems to be a minimal wrapper around it. */ |
@@ -1469,8 +1455,6 @@ void ocfs2_recovery_thread(struct ocfs2_super *osb, int node_num) | |||
1469 | out: | 1455 | out: |
1470 | mutex_unlock(&osb->recovery_lock); | 1456 | mutex_unlock(&osb->recovery_lock); |
1471 | wake_up(&osb->recovery_event); | 1457 | wake_up(&osb->recovery_event); |
1472 | |||
1473 | mlog_exit_void(); | ||
1474 | } | 1458 | } |
1475 | 1459 | ||
1476 | static int ocfs2_read_journal_inode(struct ocfs2_super *osb, | 1460 | static int ocfs2_read_journal_inode(struct ocfs2_super *osb, |
@@ -1646,7 +1630,6 @@ done: | |||
1646 | 1630 | ||
1647 | brelse(bh); | 1631 | brelse(bh); |
1648 | 1632 | ||
1649 | mlog_exit(status); | ||
1650 | return status; | 1633 | return status; |
1651 | } | 1634 | } |
1652 | 1635 | ||
@@ -1716,7 +1699,6 @@ static int ocfs2_recover_node(struct ocfs2_super *osb, | |||
1716 | status = 0; | 1699 | status = 0; |
1717 | done: | 1700 | done: |
1718 | 1701 | ||
1719 | mlog_exit(status); | ||
1720 | return status; | 1702 | return status; |
1721 | } | 1703 | } |
1722 | 1704 | ||
@@ -1826,7 +1808,6 @@ int ocfs2_mark_dead_nodes(struct ocfs2_super *osb) | |||
1826 | 1808 | ||
1827 | status = 0; | 1809 | status = 0; |
1828 | bail: | 1810 | bail: |
1829 | mlog_exit(status); | ||
1830 | return status; | 1811 | return status; |
1831 | } | 1812 | } |
1832 | 1813 | ||