[Ocfs2-commits] mfasheh commits r2169 - trunk/fs/ocfs2
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Fri Apr 22 21:09:55 CDT 2005
Author: mfasheh
Signed-off-by: manish
Date: 2005-04-22 21:09:54 -0500 (Fri, 22 Apr 2005)
New Revision: 2169
Modified:
trunk/fs/ocfs2/24io.c
trunk/fs/ocfs2/aops.c
trunk/fs/ocfs2/dcache.c
trunk/fs/ocfs2/dir.c
trunk/fs/ocfs2/file.c
trunk/fs/ocfs2/inode.c
trunk/fs/ocfs2/namei.c
trunk/fs/ocfs2/ocfs_log.h
trunk/fs/ocfs2/super.c
trunk/fs/ocfs2/symlink.c
Log:
* get rid of EVIL_TRACE
Signed-off-by: manish
Modified: trunk/fs/ocfs2/24io.c
===================================================================
--- trunk/fs/ocfs2/24io.c 2005-04-23 01:52:24 UTC (rev 2168)
+++ trunk/fs/ocfs2/24io.c 2005-04-23 02:09:54 UTC (rev 2169)
@@ -455,11 +455,8 @@
{
int ret;
- LOG_SET_CONTEXT(KVEC_READ);
-
ret = ocfs_aio_rw(READ, file, req, iocb);
- LOG_CLEAR_CONTEXT();
return ret;
}
@@ -467,11 +464,8 @@
{
int ret;
- LOG_SET_CONTEXT(KVEC_WRITE);
-
ret = ocfs_aio_rw(WRITE, file, req, iocb);
- LOG_CLEAR_CONTEXT();
return ret;
}
Modified: trunk/fs/ocfs2/aops.c
===================================================================
--- trunk/fs/ocfs2/aops.c 2005-04-23 01:52:24 UTC (rev 2168)
+++ trunk/fs/ocfs2/aops.c 2005-04-23 02:09:54 UTC (rev 2169)
@@ -215,13 +215,12 @@
{
int ret;
- LOG_SET_CONTEXT(READPAGE);
LOG_ENTRY_ARGS("(0x%p, %lu)\n", file, (page ? page->index : 0));
ret = block_read_full_page(page, ocfs_get_block);
LOG_EXIT_INT(ret);
- LOG_CLEAR_CONTEXT();
+
return ret;
}
@@ -230,13 +229,12 @@
{
int ret;
- LOG_SET_CONTEXT(WRITEPAGE);
LOG_ENTRY_ARGS("(0x%p)\n", page);
ret = block_write_full_page(page, ocfs_get_block, wbc);
LOG_EXIT_INT(ret);
- LOG_CLEAR_CONTEXT();
+
return ret;
}
#else
@@ -244,13 +242,12 @@
{
int ret;
- LOG_SET_CONTEXT(WRITEPAGE);
LOG_ENTRY_ARGS("(0x%p)\n", page);
ret = block_write_full_page(page, ocfs_get_block);
LOG_EXIT_INT(ret);
- LOG_CLEAR_CONTEXT();
+
return ret;
}
#endif
@@ -398,14 +395,13 @@
{
int ret;
- LOG_SET_CONTEXT(PREPARE_WRITE);
LOG_ENTRY_ARGS("(0x%p, 0x%p, %u, %u)\n", file, page, from, to);
ret = cont_prepare_write(page, from, to, ocfs_get_block,
&(OCFS_I(page->mapping->host)->ip_mmu_private));
LOG_EXIT_INT(ret);
- LOG_CLEAR_CONTEXT();
+
return ret;
}
@@ -418,13 +414,12 @@
{
int ret;
- LOG_SET_CONTEXT(COMMIT_WRITE);
LOG_ENTRY_ARGS("(0x%p, 0x%p, %u, %u)\n", file, page, from, to);
ret = generic_commit_write(file, page, from, to);
LOG_EXIT_INT(ret);
- LOG_CLEAR_CONTEXT();
+
return ret;
}
@@ -444,7 +439,6 @@
int err = 0;
struct inode *inode = mapping->host;
- LOG_SET_CONTEXT(BMAP);
LOG_ENTRY_ARGS("(block = %llu)\n", (unsigned long long)block);
if (!INODE_JOURNAL(inode)) {
@@ -473,7 +467,7 @@
#endif
LOG_EXIT_STATUS((int)status);
- LOG_CLEAR_CONTEXT();
+
return status;
}
@@ -570,8 +564,6 @@
struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
int ret;
- LOG_SET_CONTEXT(DIRECT_IO);
-
LOG_ENTRY ();
/* blockdev_direct_IO checks alignment for us, using */
@@ -581,7 +573,6 @@
NULL);
LOG_EXIT_INT (ret);
- LOG_CLEAR_CONTEXT();
return ret;
} /* ocfs_direct_IO */
#else
Modified: trunk/fs/ocfs2/dcache.c
===================================================================
--- trunk/fs/ocfs2/dcache.c 2005-04-23 01:52:24 UTC (rev 2168)
+++ trunk/fs/ocfs2/dcache.c 2005-04-23 02:09:54 UTC (rev 2169)
@@ -48,8 +48,6 @@
int ret = 0; /* if all else fails, just return false */
ocfs_super *osb;
- LOG_SET_CONTEXT(D_REVALIDATE);
-
LOG_ENTRY_ARGS ("(0x%p, %d, '%.*s')\n", dentry, flags,
dentry->d_name.len, dentry->d_name.name);
@@ -89,7 +87,6 @@
bail:
LOG_EXIT_INT (ret);
- LOG_CLEAR_CONTEXT();
return ret;
}
Modified: trunk/fs/ocfs2/dir.c
===================================================================
--- trunk/fs/ocfs2/dir.c 2005-04-23 01:52:24 UTC (rev 2168)
+++ trunk/fs/ocfs2/dir.c 2005-04-23 02:09:54 UTC (rev 2169)
@@ -85,8 +85,6 @@
struct super_block * sb = inode->i_sb;
int have_disk_lock = 0;
- LOG_SET_CONTEXT(READDIR);
-
LOG_ENTRY_ARGS("dirino=%llu\n", OCFS_I(inode)->ip_blkno);
stored = 0;
@@ -202,7 +200,7 @@
ocfs2_meta_unlock(inode, 0);
LOG_EXIT_STATUS(stored);
- LOG_CLEAR_CONTEXT();
+
return stored;
}
Modified: trunk/fs/ocfs2/file.c
===================================================================
--- trunk/fs/ocfs2/file.c 2005-04-23 01:52:24 UTC (rev 2168)
+++ trunk/fs/ocfs2/file.c 2005-04-23 02:09:54 UTC (rev 2169)
@@ -128,7 +128,6 @@
{
ocfs_inode_private *oip = OCFS_I(inode);
- LOG_SET_CONTEXT(RELEASE);
LOG_ENTRY_ARGS("(0x%p, 0x%p, '%.*s')\n", inode, file,
file->f_dentry->d_name.len,
file->f_dentry->d_name.name);
@@ -139,7 +138,7 @@
spin_unlock(&oip->ip_lock);
LOG_EXIT_INT(0);
- LOG_CLEAR_CONTEXT();
+
return 0;
}
@@ -155,8 +154,6 @@
struct inode *inode = dentry->d_inode;
ocfs_super *osb = OCFS_SB(inode->i_sb);
- LOG_SET_CONTEXT(FSYNC);
-
LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, '%.*s')\n", file, dentry, datasync,
dentry->d_name.len, dentry->d_name.name);
@@ -170,7 +167,6 @@
bail:
LOG_EXIT_STATUS (err);
- LOG_CLEAR_CONTEXT();
return (err < 0) ? -EIO : 0;
} /* ocfs_sync_file */
@@ -223,8 +219,6 @@
struct ocfs2_write_lock_info info = {0, };
DECLARE_BUFFER_LOCK_CTXT(ctxt);
- LOG_SET_CONTEXT(WRITE);
-
LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u, '%.*s')\n", filp, buf,
(unsigned int)count,
filp->f_dentry->d_name.len,
@@ -290,7 +284,6 @@
up(&inode->i_sem);
LOG_EXIT_INT (ret);
- LOG_CLEAR_CONTEXT();
return ret;
}
@@ -312,8 +305,6 @@
int sector_size;
DECLARE_BUFFER_LOCK_CTXT(ctxt);
- LOG_SET_CONTEXT(READ);
-
LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u, '%.*s')\n", filp, buf,
(unsigned int)count, filp->f_dentry->d_name.len,
filp->f_dentry->d_name.name);
@@ -387,7 +378,6 @@
bail:
LOG_EXIT_INT (ret);
- LOG_CLEAR_CONTEXT();
return ret;
} /* ocfs_file_read */
@@ -1145,8 +1135,6 @@
ocfs_super *osb = sb->s_fs_info;
int err;
- LOG_SET_CONTEXT(GETATTR);
-
LOG_ENTRY();
err = ocfs_inode_revalidate(dentry);
@@ -1164,7 +1152,6 @@
bail:
LOG_EXIT_INT (err);
- LOG_CLEAR_CONTEXT();
return err;
}
Modified: trunk/fs/ocfs2/inode.c
===================================================================
--- trunk/fs/ocfs2/inode.c 2005-04-23 01:52:24 UTC (rev 2168)
+++ trunk/fs/ocfs2/inode.c 2005-04-23 02:09:54 UTC (rev 2169)
@@ -264,19 +264,15 @@
void ocfs_read_inode2(struct inode *inode, void *opaque)
{
- LOG_SET_CONTEXT(READ_INODE2);
if (ocfs_read_locked_inode(inode, opaque) < 0) {
LOG_ERROR_ARGS("bad inode: i_ino=%lu\n", inode->i_ino);
make_bad_inode(inode);
}
- LOG_CLEAR_CONTEXT();
}
void ocfs_read_inode(struct inode *inode)
{
- LOG_SET_CONTEXT(READ_INODE);
make_bad_inode(inode);
- LOG_CLEAR_CONTEXT();
}
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) */
@@ -606,8 +602,6 @@
struct buffer_head *fe_bh = NULL;
ocfs2_dinode *fe;
- LOG_SET_CONTEXT(DELETE_INODE);
-
LOG_ENTRY_ARGS("(inode->i_ino = %lu)\n", inode->i_ino);
if (OCFS_I(inode)->ip_flags & OCFS_INODE_SYSTEM_FILE) {
@@ -797,8 +791,6 @@
/* we must clear inode. */
clear_inode(inode);
LOG_EXIT();
-
- LOG_CLEAR_CONTEXT();
} /* ocfs_delete_inode */
/*
@@ -810,8 +802,6 @@
int status;
ocfs_super *osb;
- LOG_SET_CONTEXT(CLEAR_INODE);
-
LOG_ENTRY();
if (!inode)
@@ -867,8 +857,6 @@
}
LOG_EXIT ();
-
- LOG_CLEAR_CONTEXT();
} /* ocfs_clear_inode */
/*
@@ -937,8 +925,6 @@
int status = 0;
ocfs_super *osb;
- LOG_SET_CONTEXT(REVALIDATE);
-
LOG_ENTRY_ARGS("(inode = 0x%p, ino = %llu)\n", inode,
inode ? OCFS_I(inode)->ip_blkno : 0ULL);
@@ -968,7 +954,6 @@
bail:
LOG_EXIT_STATUS(status);
- LOG_CLEAR_CONTEXT();
return status;
} /* ocfs_inode_revalidate */
Modified: trunk/fs/ocfs2/namei.c
===================================================================
--- trunk/fs/ocfs2/namei.c 2005-04-23 01:52:24 UTC (rev 2168)
+++ trunk/fs/ocfs2/namei.c 2005-04-23 02:09:54 UTC (rev 2169)
@@ -147,8 +147,6 @@
ocfs_super *osb = OCFS_SB(sb);
struct ocfs2_dir_entry *dirent;
- LOG_SET_CONTEXT(LOOKUP);
-
LOG_ENTRY_ARGS ("(0x%p, 0x%p, '%.*s')\n", dir, dentry,
dentry->d_name.len, dentry->d_name.name);
@@ -184,7 +182,6 @@
LOG_EXIT_PTR (ret);
- LOG_CLEAR_CONTEXT();
return ret;
} /* ocfs_lookup */
@@ -204,8 +201,6 @@
struct buffer_head *dirent_bh = NULL;
struct ocfs2_dir_entry *dirent;
- LOG_SET_CONTEXT(LOOKUP);
-
LOG_ENTRY_ARGS ("(0x%p, '%.*s')\n", child,
child->d_name.len, child->d_name.name);
@@ -238,7 +233,6 @@
LOG_EXIT_PTR (parent);
- LOG_CLEAR_CONTEXT();
return parent;
} /* ocfs_get_parent */
@@ -327,8 +321,6 @@
ocfs2_alloc_context *inode_ac = NULL;
ocfs2_alloc_context *data_ac = NULL;
- LOG_SET_CONTEXT(MKNOD);
-
LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, %lu, '%.*s')\n", dir, dentry, mode,
(unsigned long)dev, dentry->d_name.len, dentry->d_name.name);
@@ -498,7 +490,6 @@
LOG_EXIT_STATUS(status);
- LOG_CLEAR_CONTEXT();
return status;
} /* ocfs_mknod */
@@ -621,14 +612,11 @@
{
int ret;
- LOG_SET_CONTEXT(MKDIR);
-
LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, '%.*s')\n", dir, dentry, mode,
dentry->d_name.len, dentry->d_name.name);
ret = ocfs_mknod (dir, dentry, mode | S_IFDIR, 0);
LOG_EXIT_INT (ret);
- LOG_CLEAR_CONTEXT();
return ret;
} /* ocfs_mkdir */
@@ -640,14 +628,11 @@
{
int ret;
- LOG_SET_CONTEXT(CREATE);
-
LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, '%.*s')\n", dir, dentry, mode,
dentry->d_name.len, dentry->d_name.name);
ret = ocfs_mknod (dir, dentry, mode | S_IFREG, 0);
LOG_EXIT_INT (ret);
- LOG_CLEAR_CONTEXT();
return ret;
} /* ocfs_create */
@@ -667,8 +652,6 @@
ocfs2_dinode *fe = NULL;
ocfs_super *osb = OCFS_SB(dir->i_sb);
- LOG_SET_CONTEXT(LINK);
-
LOG_ENTRY_ARGS ("(inode=%lu, old='%.*s' new='%.*s')\n",
inode->i_ino, old_dentry->d_name.len,
old_dentry->d_name.name, dentry->d_name.len,
@@ -765,7 +748,6 @@
LOG_EXIT_STATUS(err);
- LOG_CLEAR_CONTEXT();
return err;
} /* ocfs_link */
@@ -789,8 +771,6 @@
char *orphan_name = NULL;
struct buffer_head *orphan_entry_bh = NULL;
- LOG_SET_CONTEXT(UNLINK);
-
LOG_ENTRY_ARGS ("(0x%p, 0x%p, '%.*s')\n", dir, dentry,
dentry->d_name.len, dentry->d_name.name);
@@ -958,7 +938,6 @@
LOG_EXIT_INT (retval);
- LOG_CLEAR_CONTEXT();
return retval;
} /* ocfs_unlink */
@@ -1054,8 +1033,6 @@
// this is the 1st dirent bh
nlink_t old_dir_nlink = old_dir->i_nlink, new_dir_nlink = new_dir->i_nlink;
- LOG_SET_CONTEXT(RENAME);
-
LOG_ENTRY_ARGS ("(0x%p, 0x%p, 0x%p, 0x%p, from='%.*s' to='%.*s')\n",
old_dir, old_dentry, new_dir, new_dentry,
old_dentry->d_name.len, old_dentry->d_name.name,
@@ -1393,7 +1370,6 @@
LOG_EXIT_STATUS(status);
- LOG_CLEAR_CONTEXT();
return status;
} /* ocfs_rename */
@@ -1526,8 +1502,6 @@
ocfs2_alloc_context *inode_ac = NULL;
ocfs2_alloc_context *data_ac = NULL;
- LOG_SET_CONTEXT(SYMLINK);
-
LOG_ENTRY_ARGS ("(0x%p, 0x%p, symname='%s' actual='%.*s')\n", dir,
dentry, symname, dentry->d_name.len,
dentry->d_name.name);
@@ -1693,7 +1667,6 @@
LOG_EXIT_STATUS (status);
- LOG_CLEAR_CONTEXT();
return status;
} /* ocfs_symlink */
Modified: trunk/fs/ocfs2/ocfs_log.h
===================================================================
--- trunk/fs/ocfs2/ocfs_log.h 2005-04-23 01:52:24 UTC (rev 2168)
+++ trunk/fs/ocfs2/ocfs_log.h 2005-04-23 02:09:54 UTC (rev 2169)
@@ -30,59 +30,6 @@
extern u32 debug_level;
extern u32 debug_exclude;
-#ifndef TRACE
-#undef EVIL_TRACE
-#endif
-
-#ifdef EVIL_TRACE
-extern u64 debug_mask;
-
-enum {
- OCFS_TRACE_CREATE=1,
- OCFS_TRACE_LOOKUP,
- OCFS_TRACE_LINK,
- OCFS_TRACE_UNLINK,
- /* OCFS_TRACE_RMDIR, */
- OCFS_TRACE_SYMLINK,
- OCFS_TRACE_MKDIR,
- OCFS_TRACE_MKNOD,
- OCFS_TRACE_RENAME,
- OCFS_TRACE_SETATTR,
- OCFS_TRACE_GETATTR,
- OCFS_TRACE_REVALIDATE,
- OCFS_TRACE_READPAGE,
- OCFS_TRACE_WRITEPAGE,
- OCFS_TRACE_PREPARE_WRITE,
- OCFS_TRACE_BMAP,
- OCFS_TRACE_COMMIT_WRITE,
- OCFS_TRACE_DIRECT_IO,
- /* OCFS_TRACE_READLINK, */
- OCFS_TRACE_FOLLOW_LINK,
- OCFS_TRACE_READ,
- OCFS_TRACE_WRITE,
- /* OCFS_TRACE_MMAP, */
- OCFS_TRACE_FSYNC,
- OCFS_TRACE_FLUSH,
- OCFS_TRACE_RELEASE,
- OCFS_TRACE_IOCTL,
- OCFS_TRACE_KVEC_READ,
- OCFS_TRACE_KVEC_WRITE,
- /* OCFS_TRACE_AIO_READ, */
- /* OCFS_TRACE_AIO_WRITE, */
- OCFS_TRACE_READDIR,
- OCFS_TRACE_D_REVALIDATE,
- OCFS_TRACE_STATFS,
- OCFS_TRACE_PUT_INODE,
- OCFS_TRACE_CLEAR_INODE,
- OCFS_TRACE_DELETE_INODE,
- OCFS_TRACE_READ_INODE,
- OCFS_TRACE_READ_INODE2,
- OCFS_TRACE_PUT_SUPER,
-};
-#endif
-
-
-
/* Tracing Levels */
#define OCFS_DEBUG_LEVEL_ERROR 0x00000001
#define OCFS_DEBUG_LEVEL_TRACE 0x00000002
@@ -181,14 +128,8 @@
# define IF_LEVEL_NO_CONTEXT(level) \
if ((debug_level & level) && current->pid!=debug_exclude)
-#if defined(EVIL_TRACE)
-# define IF_LEVEL(level) \
- if (debug_mask & (1ULL << (current->flags >> 24)))
-#else
# define IF_LEVEL(level) IF_LEVEL_CONTEXT(level)
-#endif
-
#ifndef OCFS_DBG_TIMING
# define ENTRY_TIMING_DECLS
# define GET_TIMING(s, hi, lo)
@@ -374,12 +315,4 @@
LOG_ERROR_ARGS("status = %lld\n", (long long)(st)); \
} while (0)
-#ifdef EVIL_TRACE
-#define LOG_SET_CONTEXT(ctxt) current->flags |= (OCFS_TRACE_ ## ctxt) << 24
-#define LOG_CLEAR_CONTEXT() current->flags &= 0xffffff
-#else
-#define LOG_SET_CONTEXT(ctxt)
-#define LOG_CLEAR_CONTEXT()
-#endif
-
#endif /* OCFS_LOG_H */
Modified: trunk/fs/ocfs2/super.c
===================================================================
--- trunk/fs/ocfs2/super.c 2005-04-23 01:52:24 UTC (rev 2168)
+++ trunk/fs/ocfs2/super.c 2005-04-23 02:09:54 UTC (rev 2169)
@@ -83,10 +83,6 @@
u32 debug_level = 0;
u32 debug_exclude = 0;
-#ifdef EVIL_TRACE
-u64 debug_mask = 0;
-#endif
-
static ctl_table ocfs_dbg_table[] = {
{
.ctl_name = KERN_OCFS2_NM + 1,
@@ -581,16 +577,12 @@
*/
static void ocfs_put_super (struct super_block *sb)
{
- LOG_SET_CONTEXT(PUT_SUPER);
-
LOG_ENTRY_ARGS ("(0x%p)\n", sb);
ocfs_sync_blockdev(sb);
ocfs_dismount_volume (sb);
LOG_EXIT ();
-
- LOG_CLEAR_CONTEXT();
} /* ocfs_put_super */
@@ -608,8 +600,6 @@
struct buffer_head *bh = NULL;
struct inode *inode = NULL;
- LOG_SET_CONTEXT(STATFS);
-
LOG_ENTRY_ARGS ("(%p, %p)\n", sb, buf);
osb = OCFS_SB(sb);
@@ -655,7 +645,6 @@
LOG_EXIT_INT (status);
- LOG_CLEAR_CONTEXT();
return status;
} /* ocfs_statfs */
Modified: trunk/fs/ocfs2/symlink.c
===================================================================
--- trunk/fs/ocfs2/symlink.c 2005-04-23 01:52:24 UTC (rev 2168)
+++ trunk/fs/ocfs2/symlink.c 2005-04-23 02:09:54 UTC (rev 2169)
@@ -278,8 +278,6 @@
char *orig_link, *new_link;
unsigned int len, res = 0;
- LOG_SET_CONTEXT(FOLLOW_LINK);
-
if (ocfs2_inode_is_fast_symlink(inode))
orig_link = ocfs2_fast_symlink_getlink(inode, &bh);
else
@@ -306,7 +304,6 @@
if (bh)
brelse(bh);
- LOG_CLEAR_CONTEXT();
return res;
}
More information about the Ocfs2-commits
mailing list