aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/namei.c
diff options
context:
space:
mode:
authorTao Ma <boyu.mt@taobao.com>2011-02-20 22:10:44 -0500
committerTao Ma <boyu.mt@taobao.com>2011-02-20 22:10:44 -0500
commitef6b689b63b9f5227ccee6f16dd9ee3faf58a464 (patch)
treeebe3416fcc221e152f2625e8e8794e92e3d8c979 /fs/ocfs2/namei.c
parent422e6c4bc4b48c15b3cb57a1ca71431abfc57e54 (diff)
ocfs2: Remove ENTRY from masklog.
ENTRY is used to record the entry 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. So for mlog_entry_void, we just remove it. for mlog_entry(...), we replace it with mlog(0,...), and they will be replace by trace event later. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Diffstat (limited to 'fs/ocfs2/namei.c')
-rw-r--r--fs/ocfs2/namei.c74
1 files changed, 35 insertions, 39 deletions
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
index 849fb4a2e814..fdf5c0b75caa 100644
--- a/fs/ocfs2/namei.c
+++ b/fs/ocfs2/namei.c
@@ -106,8 +106,8 @@ static struct dentry *ocfs2_lookup(struct inode *dir, struct dentry *dentry,
106 struct dentry *ret; 106 struct dentry *ret;
107 struct ocfs2_inode_info *oi; 107 struct ocfs2_inode_info *oi;
108 108
109 mlog_entry("(0x%p, 0x%p, '%.*s')\n", dir, dentry, 109 mlog(0, "(0x%p, 0x%p, '%.*s')\n", dir, dentry,
110 dentry->d_name.len, dentry->d_name.name); 110 dentry->d_name.len, dentry->d_name.name);
111 111
112 if (dentry->d_name.len > OCFS2_MAX_FILENAME_LEN) { 112 if (dentry->d_name.len > OCFS2_MAX_FILENAME_LEN) {
113 ret = ERR_PTR(-ENAMETOOLONG); 113 ret = ERR_PTR(-ENAMETOOLONG);
@@ -235,9 +235,9 @@ static int ocfs2_mknod(struct inode *dir,
235 sigset_t oldset; 235 sigset_t oldset;
236 int did_block_signals = 0; 236 int did_block_signals = 0;
237 237
238 mlog_entry("(0x%p, 0x%p, %d, %lu, '%.*s')\n", dir, dentry, mode, 238 mlog(0, "(0x%p, 0x%p, %d, %lu, '%.*s')\n", dir, dentry, mode,
239 (unsigned long)dev, dentry->d_name.len, 239 (unsigned long)dev, dentry->d_name.len,
240 dentry->d_name.name); 240 dentry->d_name.name);
241 241
242 dquot_initialize(dir); 242 dquot_initialize(dir);
243 243
@@ -354,9 +354,9 @@ static int ocfs2_mknod(struct inode *dir,
354 goto leave; 354 goto leave;
355 did_quota_inode = 1; 355 did_quota_inode = 1;
356 356
357 mlog_entry("(0x%p, 0x%p, %d, %lu, '%.*s')\n", dir, dentry, 357 mlog(0, "(0x%p, 0x%p, %d, %lu, '%.*s')\n", dir, dentry,
358 inode->i_mode, (unsigned long)dev, dentry->d_name.len, 358 inode->i_mode, (unsigned long)dev, dentry->d_name.len,
359 dentry->d_name.name); 359 dentry->d_name.name);
360 360
361 /* do the real work now. */ 361 /* do the real work now. */
362 status = ocfs2_mknod_locked(osb, dir, inode, dev, 362 status = ocfs2_mknod_locked(osb, dir, inode, dev,
@@ -615,8 +615,8 @@ static int ocfs2_mkdir(struct inode *dir,
615{ 615{
616 int ret; 616 int ret;
617 617
618 mlog_entry("(0x%p, 0x%p, %d, '%.*s')\n", dir, dentry, mode, 618 mlog(0, "(0x%p, 0x%p, %d, '%.*s')\n", dir, dentry, mode,
619 dentry->d_name.len, dentry->d_name.name); 619 dentry->d_name.len, dentry->d_name.name);
620 ret = ocfs2_mknod(dir, dentry, mode | S_IFDIR, 0); 620 ret = ocfs2_mknod(dir, dentry, mode | S_IFDIR, 0);
621 mlog_exit(ret); 621 mlog_exit(ret);
622 622
@@ -630,8 +630,8 @@ static int ocfs2_create(struct inode *dir,
630{ 630{
631 int ret; 631 int ret;
632 632
633 mlog_entry("(0x%p, 0x%p, %d, '%.*s')\n", dir, dentry, mode, 633 mlog(0, "(0x%p, 0x%p, %d, '%.*s')\n", dir, dentry, mode,
634 dentry->d_name.len, dentry->d_name.name); 634 dentry->d_name.len, dentry->d_name.name);
635 ret = ocfs2_mknod(dir, dentry, mode | S_IFREG, 0); 635 ret = ocfs2_mknod(dir, dentry, mode | S_IFREG, 0);
636 mlog_exit(ret); 636 mlog_exit(ret);
637 637
@@ -652,9 +652,9 @@ static int ocfs2_link(struct dentry *old_dentry,
652 struct ocfs2_dir_lookup_result lookup = { NULL, }; 652 struct ocfs2_dir_lookup_result lookup = { NULL, };
653 sigset_t oldset; 653 sigset_t oldset;
654 654
655 mlog_entry("(inode=%lu, old='%.*s' new='%.*s')\n", inode->i_ino, 655 mlog(0, "(inode=%lu, old='%.*s' new='%.*s')\n", inode->i_ino,
656 old_dentry->d_name.len, old_dentry->d_name.name, 656 old_dentry->d_name.len, old_dentry->d_name.name,
657 dentry->d_name.len, dentry->d_name.name); 657 dentry->d_name.len, dentry->d_name.name);
658 658
659 if (S_ISDIR(inode->i_mode)) 659 if (S_ISDIR(inode->i_mode))
660 return -EPERM; 660 return -EPERM;
@@ -809,8 +809,8 @@ static int ocfs2_unlink(struct inode *dir,
809 struct ocfs2_dir_lookup_result lookup = { NULL, }; 809 struct ocfs2_dir_lookup_result lookup = { NULL, };
810 struct ocfs2_dir_lookup_result orphan_insert = { NULL, }; 810 struct ocfs2_dir_lookup_result orphan_insert = { NULL, };
811 811
812 mlog_entry("(0x%p, 0x%p, '%.*s')\n", dir, dentry, 812 mlog(0, "(0x%p, 0x%p, '%.*s')\n", dir, dentry,
813 dentry->d_name.len, dentry->d_name.name); 813 dentry->d_name.len, dentry->d_name.name);
814 814
815 dquot_initialize(dir); 815 dquot_initialize(dir);
816 816
@@ -975,9 +975,9 @@ static int ocfs2_double_lock(struct ocfs2_super *osb,
975 struct buffer_head **tmpbh; 975 struct buffer_head **tmpbh;
976 struct inode *tmpinode; 976 struct inode *tmpinode;
977 977
978 mlog_entry("(inode1 = %llu, inode2 = %llu)\n", 978 mlog(0, "(inode1 = %llu, inode2 = %llu)\n",
979 (unsigned long long)oi1->ip_blkno, 979 (unsigned long long)oi1->ip_blkno,
980 (unsigned long long)oi2->ip_blkno); 980 (unsigned long long)oi2->ip_blkno);
981 981
982 if (*bh1) 982 if (*bh1)
983 *bh1 = NULL; 983 *bh1 = NULL;
@@ -1067,10 +1067,10 @@ static int ocfs2_rename(struct inode *old_dir,
1067 /* At some point it might be nice to break this function up a 1067 /* At some point it might be nice to break this function up a
1068 * bit. */ 1068 * bit. */
1069 1069
1070 mlog_entry("(0x%p, 0x%p, 0x%p, 0x%p, from='%.*s' to='%.*s')\n", 1070 mlog(0, "(0x%p, 0x%p, 0x%p, 0x%p, from='%.*s' to='%.*s')\n",
1071 old_dir, old_dentry, new_dir, new_dentry, 1071 old_dir, old_dentry, new_dir, new_dentry,
1072 old_dentry->d_name.len, old_dentry->d_name.name, 1072 old_dentry->d_name.len, old_dentry->d_name.name,
1073 new_dentry->d_name.len, new_dentry->d_name.name); 1073 new_dentry->d_name.len, new_dentry->d_name.name);
1074 1074
1075 dquot_initialize(old_dir); 1075 dquot_initialize(old_dir);
1076 dquot_initialize(new_dir); 1076 dquot_initialize(new_dir);
@@ -1501,9 +1501,9 @@ static int ocfs2_create_symlink_data(struct ocfs2_super *osb,
1501 * write i_size + 1 bytes. */ 1501 * write i_size + 1 bytes. */
1502 blocks = (bytes_left + sb->s_blocksize - 1) >> sb->s_blocksize_bits; 1502 blocks = (bytes_left + sb->s_blocksize - 1) >> sb->s_blocksize_bits;
1503 1503
1504 mlog_entry("i_blocks = %llu, i_size = %llu, blocks = %d\n", 1504 mlog(0, "i_blocks = %llu, i_size = %llu, blocks = %d\n",
1505 (unsigned long long)inode->i_blocks, 1505 (unsigned long long)inode->i_blocks,
1506 i_size_read(inode), blocks); 1506 i_size_read(inode), blocks);
1507 1507
1508 /* Sanity check -- make sure we're going to fit. */ 1508 /* Sanity check -- make sure we're going to fit. */
1509 if (bytes_left > 1509 if (bytes_left >
@@ -1610,8 +1610,8 @@ static int ocfs2_symlink(struct inode *dir,
1610 sigset_t oldset; 1610 sigset_t oldset;
1611 int did_block_signals = 0; 1611 int did_block_signals = 0;
1612 1612
1613 mlog_entry("(0x%p, 0x%p, symname='%s' actual='%.*s')\n", dir, 1613 mlog(0, "(0x%p, 0x%p, symname='%s' actual='%.*s')\n", dir,
1614 dentry, symname, dentry->d_name.len, dentry->d_name.name); 1614 dentry, symname, dentry->d_name.len, dentry->d_name.name);
1615 1615
1616 dquot_initialize(dir); 1616 dquot_initialize(dir);
1617 1617
@@ -1713,9 +1713,9 @@ static int ocfs2_symlink(struct inode *dir,
1713 goto bail; 1713 goto bail;
1714 did_quota_inode = 1; 1714 did_quota_inode = 1;
1715 1715
1716 mlog_entry("(0x%p, 0x%p, %d, '%.*s')\n", dir, dentry, 1716 mlog(0, "(0x%p, 0x%p, %d, '%.*s')\n", dir, dentry,
1717 inode->i_mode, dentry->d_name.len, 1717 inode->i_mode, dentry->d_name.len,
1718 dentry->d_name.name); 1718 dentry->d_name.name);
1719 1719
1720 status = ocfs2_mknod_locked(osb, dir, inode, 1720 status = ocfs2_mknod_locked(osb, dir, inode,
1721 0, &new_fe_bh, parent_fe_bh, handle, 1721 0, &new_fe_bh, parent_fe_bh, handle,
@@ -1844,8 +1844,6 @@ static int ocfs2_blkno_stringify(u64 blkno, char *name)
1844{ 1844{
1845 int status, namelen; 1845 int status, namelen;
1846 1846
1847 mlog_entry_void();
1848
1849 namelen = snprintf(name, OCFS2_ORPHAN_NAMELEN + 1, "%016llx", 1847 namelen = snprintf(name, OCFS2_ORPHAN_NAMELEN + 1, "%016llx",
1850 (long long)blkno); 1848 (long long)blkno);
1851 if (namelen <= 0) { 1849 if (namelen <= 0) {
@@ -1997,7 +1995,7 @@ static int ocfs2_orphan_add(struct ocfs2_super *osb,
1997 struct ocfs2_dinode *orphan_fe; 1995 struct ocfs2_dinode *orphan_fe;
1998 struct ocfs2_dinode *fe = (struct ocfs2_dinode *) fe_bh->b_data; 1996 struct ocfs2_dinode *fe = (struct ocfs2_dinode *) fe_bh->b_data;
1999 1997
2000 mlog_entry("(inode->i_ino = %lu)\n", inode->i_ino); 1998 mlog(0, "(inode->i_ino = %lu)\n", inode->i_ino);
2001 1999
2002 status = ocfs2_read_inode_block(orphan_dir_inode, &orphan_dir_bh); 2000 status = ocfs2_read_inode_block(orphan_dir_inode, &orphan_dir_bh);
2003 if (status < 0) { 2001 if (status < 0) {
@@ -2078,8 +2076,6 @@ int ocfs2_orphan_del(struct ocfs2_super *osb,
2078 int status = 0; 2076 int status = 0;
2079 struct ocfs2_dir_lookup_result lookup = { NULL, }; 2077 struct ocfs2_dir_lookup_result lookup = { NULL, };
2080 2078
2081 mlog_entry_void();
2082
2083 status = ocfs2_blkno_stringify(OCFS2_I(inode)->ip_blkno, name); 2079 status = ocfs2_blkno_stringify(OCFS2_I(inode)->ip_blkno, name);
2084 if (status < 0) { 2080 if (status < 0) {
2085 mlog_errno(status); 2081 mlog_errno(status);
@@ -2358,8 +2354,8 @@ int ocfs2_mv_orphaned_inode_to_new(struct inode *dir,
2358 struct buffer_head *di_bh = NULL; 2354 struct buffer_head *di_bh = NULL;
2359 struct ocfs2_dir_lookup_result lookup = { NULL, }; 2355 struct ocfs2_dir_lookup_result lookup = { NULL, };
2360 2356
2361 mlog_entry("(0x%p, 0x%p, %.*s')\n", dir, dentry, 2357 mlog(0, "(0x%p, 0x%p, %.*s')\n", dir, dentry,
2362 dentry->d_name.len, dentry->d_name.name); 2358 dentry->d_name.len, dentry->d_name.name);
2363 2359
2364 status = ocfs2_inode_lock(dir, &parent_di_bh, 1); 2360 status = ocfs2_inode_lock(dir, &parent_di_bh, 1);
2365 if (status < 0) { 2361 if (status < 0) {