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/inode.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/inode.c')
-rw-r--r-- | fs/ocfs2/inode.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 16ee8e96f731..a96e56f12728 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c | |||
@@ -172,7 +172,7 @@ bail: | |||
172 | if (!IS_ERR(inode)) { | 172 | if (!IS_ERR(inode)) { |
173 | mlog(0, "returning inode with number %llu\n", | 173 | mlog(0, "returning inode with number %llu\n", |
174 | (unsigned long long)OCFS2_I(inode)->ip_blkno); | 174 | (unsigned long long)OCFS2_I(inode)->ip_blkno); |
175 | mlog_exit_ptr(inode); | 175 | mlog(0, "inode %p\n", inode); |
176 | } | 176 | } |
177 | 177 | ||
178 | return inode; | 178 | return inode; |
@@ -203,7 +203,6 @@ static int ocfs2_find_actor(struct inode *inode, void *opaque) | |||
203 | 203 | ||
204 | ret = 1; | 204 | ret = 1; |
205 | bail: | 205 | bail: |
206 | mlog_exit(ret); | ||
207 | return ret; | 206 | return ret; |
208 | } | 207 | } |
209 | 208 | ||
@@ -235,7 +234,6 @@ static int ocfs2_init_locked_inode(struct inode *inode, void *opaque) | |||
235 | lockdep_set_class(&OCFS2_I(inode)->ip_alloc_sem, | 234 | lockdep_set_class(&OCFS2_I(inode)->ip_alloc_sem, |
236 | &ocfs2_file_ip_alloc_sem_key); | 235 | &ocfs2_file_ip_alloc_sem_key); |
237 | 236 | ||
238 | mlog_exit(0); | ||
239 | return 0; | 237 | return 0; |
240 | } | 238 | } |
241 | 239 | ||
@@ -381,7 +379,6 @@ void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe, | |||
381 | if (S_ISDIR(inode->i_mode)) | 379 | if (S_ISDIR(inode->i_mode)) |
382 | ocfs2_resv_set_type(&OCFS2_I(inode)->ip_la_data_resv, | 380 | ocfs2_resv_set_type(&OCFS2_I(inode)->ip_la_data_resv, |
383 | OCFS2_RESV_FLAG_DIR); | 381 | OCFS2_RESV_FLAG_DIR); |
384 | mlog_exit_void(); | ||
385 | } | 382 | } |
386 | 383 | ||
387 | static int ocfs2_read_locked_inode(struct inode *inode, | 384 | static int ocfs2_read_locked_inode(struct inode *inode, |
@@ -534,7 +531,6 @@ bail: | |||
534 | if (args && bh) | 531 | if (args && bh) |
535 | brelse(bh); | 532 | brelse(bh); |
536 | 533 | ||
537 | mlog_exit(status); | ||
538 | return status; | 534 | return status; |
539 | } | 535 | } |
540 | 536 | ||
@@ -598,7 +594,6 @@ static int ocfs2_truncate_for_delete(struct ocfs2_super *osb, | |||
598 | out: | 594 | out: |
599 | if (handle) | 595 | if (handle) |
600 | ocfs2_commit_trans(osb, handle); | 596 | ocfs2_commit_trans(osb, handle); |
601 | mlog_exit(status); | ||
602 | return status; | 597 | return status; |
603 | } | 598 | } |
604 | 599 | ||
@@ -1078,7 +1073,7 @@ bail_unlock_nfs_sync: | |||
1078 | bail_unblock: | 1073 | bail_unblock: |
1079 | ocfs2_unblock_signals(&oldset); | 1074 | ocfs2_unblock_signals(&oldset); |
1080 | bail: | 1075 | bail: |
1081 | mlog_exit_void(); | 1076 | return; |
1082 | } | 1077 | } |
1083 | 1078 | ||
1084 | static void ocfs2_clear_inode(struct inode *inode) | 1079 | static void ocfs2_clear_inode(struct inode *inode) |
@@ -1177,8 +1172,6 @@ static void ocfs2_clear_inode(struct inode *inode) | |||
1177 | */ | 1172 | */ |
1178 | jbd2_journal_release_jbd_inode(OCFS2_SB(inode->i_sb)->journal->j_journal, | 1173 | jbd2_journal_release_jbd_inode(OCFS2_SB(inode->i_sb)->journal->j_journal, |
1179 | &oi->ip_jinode); | 1174 | &oi->ip_jinode); |
1180 | |||
1181 | mlog_exit_void(); | ||
1182 | } | 1175 | } |
1183 | 1176 | ||
1184 | void ocfs2_evict_inode(struct inode *inode) | 1177 | void ocfs2_evict_inode(struct inode *inode) |
@@ -1208,7 +1201,6 @@ int ocfs2_drop_inode(struct inode *inode) | |||
1208 | else | 1201 | else |
1209 | res = generic_drop_inode(inode); | 1202 | res = generic_drop_inode(inode); |
1210 | 1203 | ||
1211 | mlog_exit_void(); | ||
1212 | return res; | 1204 | return res; |
1213 | } | 1205 | } |
1214 | 1206 | ||
@@ -1248,8 +1240,6 @@ int ocfs2_inode_revalidate(struct dentry *dentry) | |||
1248 | } | 1240 | } |
1249 | ocfs2_inode_unlock(inode, 0); | 1241 | ocfs2_inode_unlock(inode, 0); |
1250 | bail: | 1242 | bail: |
1251 | mlog_exit(status); | ||
1252 | |||
1253 | return status; | 1243 | return status; |
1254 | } | 1244 | } |
1255 | 1245 | ||
@@ -1296,7 +1286,6 @@ int ocfs2_mark_inode_dirty(handle_t *handle, | |||
1296 | 1286 | ||
1297 | ocfs2_journal_dirty(handle, bh); | 1287 | ocfs2_journal_dirty(handle, bh); |
1298 | leave: | 1288 | leave: |
1299 | mlog_exit(status); | ||
1300 | return status; | 1289 | return status; |
1301 | } | 1290 | } |
1302 | 1291 | ||