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>
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index 47a6ce8..80ffbe3 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -985,7 +985,7 @@
bail:
brelse(eb_bh);
- mlog_exit(retval);
+ mlog(0, "retval = %d\n", retval);
return retval;
}
@@ -1070,8 +1070,8 @@
brelse(bhs[i]);
bhs[i] = NULL;
}
+ mlog_errno(status);
}
- mlog_exit(status);
return status;
}
@@ -1326,7 +1326,6 @@
kfree(new_eb_bhs);
}
- mlog_exit(status);
return status;
}
@@ -1407,7 +1406,6 @@
bail:
brelse(new_eb_bh);
- mlog_exit(status);
return status;
}
@@ -1493,7 +1491,6 @@
bail:
brelse(bh);
- mlog_exit(status);
return status;
}
@@ -4552,7 +4549,7 @@
ocfs2_et_get_last_eb_blk(et),
&bh);
if (ret) {
- mlog_exit(ret);
+ mlog_errno(ret);
goto out;
}
eb = (struct ocfs2_extent_block *) bh->b_data;
@@ -4716,7 +4713,6 @@
bail:
brelse(last_eb_bh);
- mlog_exit(status);
return status;
}
@@ -4818,7 +4814,6 @@
}
leave:
- mlog_exit(status);
if (reason_ret)
*reason_ret = reason;
return status;
@@ -5029,7 +5024,7 @@
ocfs2_et_get_last_eb_blk(et),
&last_eb_bh);
if (ret) {
- mlog_exit(ret);
+ mlog_errno(ret);
goto out;
}
@@ -5849,7 +5844,6 @@
osb->truncated_clusters += num_clusters;
bail:
- mlog_exit(status);
return status;
}
@@ -5920,7 +5914,6 @@
osb->truncated_clusters = 0;
bail:
- mlog_exit(status);
return status;
}
@@ -5995,7 +5988,6 @@
iput(data_alloc_inode);
out:
- mlog_exit(status);
return status;
}
@@ -6023,8 +6015,6 @@
mlog_errno(status);
else
ocfs2_init_steal_slots(osb);
-
- mlog_exit(status);
}
#define OCFS2_TRUNCATE_LOG_FLUSH_INTERVAL (2 * HZ)
@@ -6070,7 +6060,6 @@
*tl_inode = inode;
*tl_bh = bh;
bail:
- mlog_exit(status);
return status;
}
@@ -6141,9 +6130,9 @@
if (status < 0 && (*tl_copy)) {
kfree(*tl_copy);
*tl_copy = NULL;
+ mlog_errno(status);
}
- mlog_exit(status);
return status;
}
@@ -6201,7 +6190,6 @@
bail_up:
mutex_unlock(&tl_inode->i_mutex);
- mlog_exit(status);
return status;
}
@@ -6221,8 +6209,6 @@
brelse(osb->osb_tl_bh);
iput(osb->osb_tl_inode);
}
-
- mlog_exit_void();
}
int ocfs2_truncate_log_init(struct ocfs2_super *osb)
@@ -6246,7 +6232,6 @@
osb->osb_tl_bh = tl_bh;
osb->osb_tl_inode = tl_inode;
- mlog_exit(status);
return status;
}
@@ -7112,7 +7097,6 @@
ocfs2_free_path(path);
- mlog_exit(status);
return status;
}