aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/alloc.c
diff options
context:
space:
mode:
authorTao Ma <boyu.mt@taobao.com>2011-03-07 03:43:21 -0500
committerTao Ma <boyu.mt@taobao.com>2011-03-07 03:43:21 -0500
commitc1e8d35ef5ffb393b94a192034b5e3541e005d75 (patch)
treeb9a7f089acd3408c2835a3dfd6aa7bb0407587b3 /fs/ocfs2/alloc.c
parentef6b689b63b9f5227ccee6f16dd9ee3faf58a464 (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/alloc.c')
-rw-r--r--fs/ocfs2/alloc.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index 47a6ce84e67f..80ffbe3dd32f 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -985,7 +985,7 @@ int ocfs2_num_free_extents(struct ocfs2_super *osb,
985bail: 985bail:
986 brelse(eb_bh); 986 brelse(eb_bh);
987 987
988 mlog_exit(retval); 988 mlog(0, "retval = %d\n", retval);
989 return retval; 989 return retval;
990} 990}
991 991
@@ -1070,8 +1070,8 @@ bail:
1070 brelse(bhs[i]); 1070 brelse(bhs[i]);
1071 bhs[i] = NULL; 1071 bhs[i] = NULL;
1072 } 1072 }
1073 mlog_errno(status);
1073 } 1074 }
1074 mlog_exit(status);
1075 return status; 1075 return status;
1076} 1076}
1077 1077
@@ -1326,7 +1326,6 @@ bail:
1326 kfree(new_eb_bhs); 1326 kfree(new_eb_bhs);
1327 } 1327 }
1328 1328
1329 mlog_exit(status);
1330 return status; 1329 return status;
1331} 1330}
1332 1331
@@ -1407,7 +1406,6 @@ static int ocfs2_shift_tree_depth(handle_t *handle,
1407bail: 1406bail:
1408 brelse(new_eb_bh); 1407 brelse(new_eb_bh);
1409 1408
1410 mlog_exit(status);
1411 return status; 1409 return status;
1412} 1410}
1413 1411
@@ -1493,7 +1491,6 @@ static int ocfs2_find_branch_target(struct ocfs2_extent_tree *et,
1493bail: 1491bail:
1494 brelse(bh); 1492 brelse(bh);
1495 1493
1496 mlog_exit(status);
1497 return status; 1494 return status;
1498} 1495}
1499 1496
@@ -4552,7 +4549,7 @@ static int ocfs2_figure_insert_type(struct ocfs2_extent_tree *et,
4552 ocfs2_et_get_last_eb_blk(et), 4549 ocfs2_et_get_last_eb_blk(et),
4553 &bh); 4550 &bh);
4554 if (ret) { 4551 if (ret) {
4555 mlog_exit(ret); 4552 mlog_errno(ret);
4556 goto out; 4553 goto out;
4557 } 4554 }
4558 eb = (struct ocfs2_extent_block *) bh->b_data; 4555 eb = (struct ocfs2_extent_block *) bh->b_data;
@@ -4716,7 +4713,6 @@ int ocfs2_insert_extent(handle_t *handle,
4716bail: 4713bail:
4717 brelse(last_eb_bh); 4714 brelse(last_eb_bh);
4718 4715
4719 mlog_exit(status);
4720 return status; 4716 return status;
4721} 4717}
4722 4718
@@ -4818,7 +4814,6 @@ int ocfs2_add_clusters_in_btree(handle_t *handle,
4818 } 4814 }
4819 4815
4820leave: 4816leave:
4821 mlog_exit(status);
4822 if (reason_ret) 4817 if (reason_ret)
4823 *reason_ret = reason; 4818 *reason_ret = reason;
4824 return status; 4819 return status;
@@ -5029,7 +5024,7 @@ int ocfs2_split_extent(handle_t *handle,
5029 ocfs2_et_get_last_eb_blk(et), 5024 ocfs2_et_get_last_eb_blk(et),
5030 &last_eb_bh); 5025 &last_eb_bh);
5031 if (ret) { 5026 if (ret) {
5032 mlog_exit(ret); 5027 mlog_errno(ret);
5033 goto out; 5028 goto out;
5034 } 5029 }
5035 5030
@@ -5849,7 +5844,6 @@ int ocfs2_truncate_log_append(struct ocfs2_super *osb,
5849 5844
5850 osb->truncated_clusters += num_clusters; 5845 osb->truncated_clusters += num_clusters;
5851bail: 5846bail:
5852 mlog_exit(status);
5853 return status; 5847 return status;
5854} 5848}
5855 5849
@@ -5920,7 +5914,6 @@ static int ocfs2_replay_truncate_records(struct ocfs2_super *osb,
5920 osb->truncated_clusters = 0; 5914 osb->truncated_clusters = 0;
5921 5915
5922bail: 5916bail:
5923 mlog_exit(status);
5924 return status; 5917 return status;
5925} 5918}
5926 5919
@@ -5995,7 +5988,6 @@ out_mutex:
5995 iput(data_alloc_inode); 5988 iput(data_alloc_inode);
5996 5989
5997out: 5990out:
5998 mlog_exit(status);
5999 return status; 5991 return status;
6000} 5992}
6001 5993
@@ -6023,8 +6015,6 @@ static void ocfs2_truncate_log_worker(struct work_struct *work)
6023 mlog_errno(status); 6015 mlog_errno(status);
6024 else 6016 else
6025 ocfs2_init_steal_slots(osb); 6017 ocfs2_init_steal_slots(osb);
6026
6027 mlog_exit(status);
6028} 6018}
6029 6019
6030#define OCFS2_TRUNCATE_LOG_FLUSH_INTERVAL (2 * HZ) 6020#define OCFS2_TRUNCATE_LOG_FLUSH_INTERVAL (2 * HZ)
@@ -6070,7 +6060,6 @@ static int ocfs2_get_truncate_log_info(struct ocfs2_super *osb,
6070 *tl_inode = inode; 6060 *tl_inode = inode;
6071 *tl_bh = bh; 6061 *tl_bh = bh;
6072bail: 6062bail:
6073 mlog_exit(status);
6074 return status; 6063 return status;
6075} 6064}
6076 6065
@@ -6141,9 +6130,9 @@ bail:
6141 if (status < 0 && (*tl_copy)) { 6130 if (status < 0 && (*tl_copy)) {
6142 kfree(*tl_copy); 6131 kfree(*tl_copy);
6143 *tl_copy = NULL; 6132 *tl_copy = NULL;
6133 mlog_errno(status);
6144 } 6134 }
6145 6135
6146 mlog_exit(status);
6147 return status; 6136 return status;
6148} 6137}
6149 6138
@@ -6201,7 +6190,6 @@ int ocfs2_complete_truncate_log_recovery(struct ocfs2_super *osb,
6201bail_up: 6190bail_up:
6202 mutex_unlock(&tl_inode->i_mutex); 6191 mutex_unlock(&tl_inode->i_mutex);
6203 6192
6204 mlog_exit(status);
6205 return status; 6193 return status;
6206} 6194}
6207 6195
@@ -6221,8 +6209,6 @@ void ocfs2_truncate_log_shutdown(struct ocfs2_super *osb)
6221 brelse(osb->osb_tl_bh); 6209 brelse(osb->osb_tl_bh);
6222 iput(osb->osb_tl_inode); 6210 iput(osb->osb_tl_inode);
6223 } 6211 }
6224
6225 mlog_exit_void();
6226} 6212}
6227 6213
6228int ocfs2_truncate_log_init(struct ocfs2_super *osb) 6214int ocfs2_truncate_log_init(struct ocfs2_super *osb)
@@ -6246,7 +6232,6 @@ int ocfs2_truncate_log_init(struct ocfs2_super *osb)
6246 osb->osb_tl_bh = tl_bh; 6232 osb->osb_tl_bh = tl_bh;
6247 osb->osb_tl_inode = tl_inode; 6233 osb->osb_tl_inode = tl_inode;
6248 6234
6249 mlog_exit(status);
6250 return status; 6235 return status;
6251} 6236}
6252 6237
@@ -7112,7 +7097,6 @@ bail:
7112 7097
7113 ocfs2_free_path(path); 7098 ocfs2_free_path(path);
7114 7099
7115 mlog_exit(status);
7116 return status; 7100 return status;
7117} 7101}
7118 7102