Commit a5b8443b authored by Tao Ma's avatar Tao Ma

ocfs2: Remove masklog ML_DCACHE.

Remove mlog(0) from fs/ocfs2/dcache.c and the masklog DCACHE.
Signed-off-by: default avatarTao Ma <boyu.mt@taobao.com>
parent 8990e44a
...@@ -97,7 +97,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = { ...@@ -97,7 +97,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = {
define_mask(BH_IO), define_mask(BH_IO),
define_mask(UPTODATE), define_mask(UPTODATE),
define_mask(VOTE), define_mask(VOTE),
define_mask(DCACHE),
define_mask(CONN), define_mask(CONN),
define_mask(QUORUM), define_mask(QUORUM),
define_mask(EXPORT), define_mask(EXPORT),
......
...@@ -99,7 +99,6 @@ ...@@ -99,7 +99,6 @@
#define ML_BH_IO 0x0000000000100000ULL /* ocfs2 buffer I/O */ #define ML_BH_IO 0x0000000000100000ULL /* ocfs2 buffer I/O */
#define ML_UPTODATE 0x0000000000200000ULL /* ocfs2 caching sequence #'s */ #define ML_UPTODATE 0x0000000000200000ULL /* ocfs2 caching sequence #'s */
#define ML_VOTE 0x0000000001000000ULL /* ocfs2 node messaging */ #define ML_VOTE 0x0000000001000000ULL /* ocfs2 node messaging */
#define ML_DCACHE 0x0000000002000000ULL /* ocfs2 dcache operations */
#define ML_CONN 0x0000000004000000ULL /* net connection management */ #define ML_CONN 0x0000000004000000ULL /* net connection management */
#define ML_QUORUM 0x0000000008000000ULL /* net connection quorum */ #define ML_QUORUM 0x0000000008000000ULL /* net connection quorum */
#define ML_EXPORT 0x0000000010000000ULL /* ocfs2 export operations */ #define ML_EXPORT 0x0000000010000000ULL /* ocfs2 export operations */
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/namei.h> #include <linux/namei.h>
#define MLOG_MASK_PREFIX ML_DCACHE
#include <cluster/masklog.h> #include <cluster/masklog.h>
#include "ocfs2.h" #include "ocfs2.h"
...@@ -39,6 +38,7 @@ ...@@ -39,6 +38,7 @@
#include "file.h" #include "file.h"
#include "inode.h" #include "inode.h"
#include "super.h" #include "super.h"
#include "ocfs2_trace.h"
void ocfs2_dentry_attach_gen(struct dentry *dentry) void ocfs2_dentry_attach_gen(struct dentry *dentry)
{ {
...@@ -62,8 +62,8 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry, ...@@ -62,8 +62,8 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry,
inode = dentry->d_inode; inode = dentry->d_inode;
osb = OCFS2_SB(dentry->d_sb); osb = OCFS2_SB(dentry->d_sb);
mlog(0, "(0x%p, '%.*s')\n", dentry, trace_ocfs2_dentry_revalidate(dentry, dentry->d_name.len,
dentry->d_name.len, dentry->d_name.name); dentry->d_name.name);
/* For a negative dentry - /* For a negative dentry -
* check the generation number of the parent and compare with the * check the generation number of the parent and compare with the
...@@ -73,9 +73,10 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry, ...@@ -73,9 +73,10 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry,
unsigned long gen = (unsigned long) dentry->d_fsdata; unsigned long gen = (unsigned long) dentry->d_fsdata;
unsigned long pgen = unsigned long pgen =
OCFS2_I(dentry->d_parent->d_inode)->ip_dir_lock_gen; OCFS2_I(dentry->d_parent->d_inode)->ip_dir_lock_gen;
mlog(0, "negative dentry: %.*s parent gen: %lu "
"dentry gen: %lu\n", trace_ocfs2_dentry_revalidate_negative(dentry->d_name.len,
dentry->d_name.len, dentry->d_name.name, pgen, gen); dentry->d_name.name,
pgen, gen);
if (gen != pgen) if (gen != pgen)
goto bail; goto bail;
goto valid; goto valid;
...@@ -90,7 +91,7 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry, ...@@ -90,7 +91,7 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry,
/* did we or someone else delete this inode? */ /* did we or someone else delete this inode? */
if (OCFS2_I(inode)->ip_flags & OCFS2_INODE_DELETED) { if (OCFS2_I(inode)->ip_flags & OCFS2_INODE_DELETED) {
spin_unlock(&OCFS2_I(inode)->ip_lock); spin_unlock(&OCFS2_I(inode)->ip_lock);
mlog(0, "inode (%llu) deleted, returning false\n", trace_ocfs2_dentry_revalidate_delete(
(unsigned long long)OCFS2_I(inode)->ip_blkno); (unsigned long long)OCFS2_I(inode)->ip_blkno);
goto bail; goto bail;
} }
...@@ -101,8 +102,7 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry, ...@@ -101,8 +102,7 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry,
* inode nlink hits zero, it never goes back. * inode nlink hits zero, it never goes back.
*/ */
if (inode->i_nlink == 0) { if (inode->i_nlink == 0) {
mlog(0, "Inode %llu orphaned, returning false " trace_ocfs2_dentry_revalidate_orphaned(
"dir = %d\n",
(unsigned long long)OCFS2_I(inode)->ip_blkno, (unsigned long long)OCFS2_I(inode)->ip_blkno,
S_ISDIR(inode->i_mode)); S_ISDIR(inode->i_mode));
goto bail; goto bail;
...@@ -113,8 +113,7 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry, ...@@ -113,8 +113,7 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry,
* redo it. * redo it.
*/ */
if (!dentry->d_fsdata) { if (!dentry->d_fsdata) {
mlog(0, "Inode %llu doesn't have dentry lock, " trace_ocfs2_dentry_revalidate_nofsdata(
"returning false\n",
(unsigned long long)OCFS2_I(inode)->ip_blkno); (unsigned long long)OCFS2_I(inode)->ip_blkno);
goto bail; goto bail;
} }
...@@ -123,7 +122,7 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry, ...@@ -123,7 +122,7 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry,
ret = 1; ret = 1;
bail: bail:
mlog(0, "ret = %d\n", ret); trace_ocfs2_dentry_revalidate_ret(ret);
return ret; return ret;
} }
...@@ -180,8 +179,8 @@ struct dentry *ocfs2_find_local_alias(struct inode *inode, ...@@ -180,8 +179,8 @@ struct dentry *ocfs2_find_local_alias(struct inode *inode,
spin_lock(&dentry->d_lock); spin_lock(&dentry->d_lock);
if (ocfs2_match_dentry(dentry, parent_blkno, skip_unhashed)) { if (ocfs2_match_dentry(dentry, parent_blkno, skip_unhashed)) {
mlog(0, "dentry found: %.*s\n", trace_ocfs2_find_local_alias(dentry->d_name.len,
dentry->d_name.len, dentry->d_name.name); dentry->d_name.name);
dget_dlock(dentry); dget_dlock(dentry);
spin_unlock(&dentry->d_lock); spin_unlock(&dentry->d_lock);
...@@ -239,8 +238,7 @@ int ocfs2_dentry_attach_lock(struct dentry *dentry, ...@@ -239,8 +238,7 @@ int ocfs2_dentry_attach_lock(struct dentry *dentry,
struct dentry *alias; struct dentry *alias;
struct ocfs2_dentry_lock *dl = dentry->d_fsdata; struct ocfs2_dentry_lock *dl = dentry->d_fsdata;
mlog(0, "Attach \"%.*s\", parent %llu, fsdata: %p\n", trace_ocfs2_dentry_attach_lock(dentry->d_name.len, dentry->d_name.name,
dentry->d_name.len, dentry->d_name.name,
(unsigned long long)parent_blkno, dl); (unsigned long long)parent_blkno, dl);
/* /*
...@@ -291,7 +289,9 @@ int ocfs2_dentry_attach_lock(struct dentry *dentry, ...@@ -291,7 +289,9 @@ int ocfs2_dentry_attach_lock(struct dentry *dentry,
(unsigned long long)parent_blkno, (unsigned long long)parent_blkno,
(unsigned long long)dl->dl_parent_blkno); (unsigned long long)dl->dl_parent_blkno);
mlog(0, "Found: %s\n", dl->dl_lockres.l_name); trace_ocfs2_dentry_attach_lock_found(dl->dl_lockres.l_name,
(unsigned long long)parent_blkno,
(unsigned long long)OCFS2_I(inode)->ip_blkno);
goto out_attach; goto out_attach;
} }
......
...@@ -2364,6 +2364,105 @@ TRACE_EVENT(ocfs2_orphan_del, ...@@ -2364,6 +2364,105 @@ TRACE_EVENT(ocfs2_orphan_del,
); );
/* End of trace events for fs/ocfs2/namei.c. */ /* End of trace events for fs/ocfs2/namei.c. */
/* Trace events for fs/ocfs2/dcache.c. */
TRACE_EVENT(ocfs2_dentry_revalidate,
TP_PROTO(void *dentry, int len, const char *name),
TP_ARGS(dentry, len, name),
TP_STRUCT__entry(
__field(void *, dentry)
__field(int, len)
__string(name, name)
),
TP_fast_assign(
__entry->dentry = dentry;
__entry->len = len;
__assign_str(name, name);
),
TP_printk("%p %.*s", __entry->dentry, __entry->len, __get_str(name))
);
TRACE_EVENT(ocfs2_dentry_revalidate_negative,
TP_PROTO(int len, const char *name, unsigned long pgen,
unsigned long gen),
TP_ARGS(len, name, pgen, gen),
TP_STRUCT__entry(
__field(int, len)
__string(name, name)
__field(unsigned long, pgen)
__field(unsigned long, gen)
),
TP_fast_assign(
__entry->len = len;
__assign_str(name, name);
__entry->pgen = pgen;
__entry->gen = gen;
),
TP_printk("%.*s %lu %lu", __entry->len, __get_str(name),
__entry->pgen, __entry->gen)
);
DEFINE_OCFS2_ULL_EVENT(ocfs2_dentry_revalidate_delete);
DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_dentry_revalidate_orphaned);
DEFINE_OCFS2_ULL_EVENT(ocfs2_dentry_revalidate_nofsdata);
DEFINE_OCFS2_INT_EVENT(ocfs2_dentry_revalidate_ret);
TRACE_EVENT(ocfs2_find_local_alias,
TP_PROTO(int len, const char *name),
TP_ARGS(len, name),
TP_STRUCT__entry(
__field(int, len)
__string(name, name)
),
TP_fast_assign(
__entry->len = len;
__assign_str(name, name);
),
TP_printk("%.*s", __entry->len, __get_str(name))
);
TRACE_EVENT(ocfs2_dentry_attach_lock,
TP_PROTO(int len, const char *name,
unsigned long long parent, void *fsdata),
TP_ARGS(len, name, parent, fsdata),
TP_STRUCT__entry(
__field(int, len)
__string(name, name)
__field(unsigned long long, parent)
__field(void *, fsdata)
),
TP_fast_assign(
__entry->len = len;
__assign_str(name, name);
__entry->parent = parent;
__entry->fsdata = fsdata;
),
TP_printk("%.*s %llu %p", __entry->len, __get_str(name),
__entry->parent, __entry->fsdata)
);
TRACE_EVENT(ocfs2_dentry_attach_lock_found,
TP_PROTO(const char *name, unsigned long long parent,
unsigned long long ino),
TP_ARGS(name, parent, ino),
TP_STRUCT__entry(
__string(name, name)
__field(unsigned long long, parent)
__field(unsigned long long, ino)
),
TP_fast_assign(
__assign_str(name, name);
__entry->parent = parent;
__entry->ino = ino;
),
TP_printk("%s %llu %llu", __get_str(name), __entry->parent, __entry->ino)
);
/* End of trace events for fs/ocfs2/dcache.c. */
#endif /* _TRACE_OCFS2_H */ #endif /* _TRACE_OCFS2_H */
/* This part must be outside protection */ /* This part must be outside protection */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment