NFSD: No longer record nf_hashval in the trace log
I'm about to replace nfsd_file_hashtbl with an rhashtable. The individual hash values will no longer be visible or relevant, so remove them from the tracepoints. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
parent
6df1941136
commit
54f7df7094
|
@ -589,7 +589,7 @@ nfsd_file_close_inode_sync(struct inode *inode)
|
|||
LIST_HEAD(dispose);
|
||||
|
||||
__nfsd_file_close_inode(inode, hashval, &dispose);
|
||||
trace_nfsd_file_close_inode_sync(inode, hashval, !list_empty(&dispose));
|
||||
trace_nfsd_file_close_inode_sync(inode, !list_empty(&dispose));
|
||||
nfsd_file_dispose_list_sync(&dispose);
|
||||
}
|
||||
|
||||
|
@ -609,7 +609,7 @@ nfsd_file_close_inode(struct inode *inode)
|
|||
LIST_HEAD(dispose);
|
||||
|
||||
__nfsd_file_close_inode(inode, hashval, &dispose);
|
||||
trace_nfsd_file_close_inode(inode, hashval, !list_empty(&dispose));
|
||||
trace_nfsd_file_close_inode(inode, !list_empty(&dispose));
|
||||
nfsd_file_dispose_list_delayed(&dispose);
|
||||
}
|
||||
|
||||
|
@ -963,7 +963,7 @@ nfsd_file_is_cached(struct inode *inode)
|
|||
}
|
||||
}
|
||||
rcu_read_unlock();
|
||||
trace_nfsd_file_is_cached(inode, hashval, (int)ret);
|
||||
trace_nfsd_file_is_cached(inode, (int)ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -995,9 +995,8 @@ retry:
|
|||
|
||||
new = nfsd_file_alloc(inode, may_flags, hashval, net);
|
||||
if (!new) {
|
||||
trace_nfsd_file_acquire(rqstp, hashval, inode, may_flags,
|
||||
NULL, nfserr_jukebox);
|
||||
return nfserr_jukebox;
|
||||
status = nfserr_jukebox;
|
||||
goto out_status;
|
||||
}
|
||||
|
||||
spin_lock(&nfsd_file_hashtbl[hashval].nfb_lock);
|
||||
|
@ -1035,8 +1034,10 @@ out:
|
|||
nf = NULL;
|
||||
}
|
||||
|
||||
trace_nfsd_file_acquire(rqstp, hashval, inode, may_flags, nf, status);
|
||||
out_status:
|
||||
trace_nfsd_file_acquire(rqstp, inode, may_flags, nf, status);
|
||||
return status;
|
||||
|
||||
open_file:
|
||||
nf = new;
|
||||
/* Take reference for the hashtable */
|
||||
|
|
|
@ -748,7 +748,6 @@ DECLARE_EVENT_CLASS(nfsd_file_class,
|
|||
TP_PROTO(struct nfsd_file *nf),
|
||||
TP_ARGS(nf),
|
||||
TP_STRUCT__entry(
|
||||
__field(unsigned int, nf_hashval)
|
||||
__field(void *, nf_inode)
|
||||
__field(int, nf_ref)
|
||||
__field(unsigned long, nf_flags)
|
||||
|
@ -756,15 +755,13 @@ DECLARE_EVENT_CLASS(nfsd_file_class,
|
|||
__field(struct file *, nf_file)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->nf_hashval = nf->nf_hashval;
|
||||
__entry->nf_inode = nf->nf_inode;
|
||||
__entry->nf_ref = refcount_read(&nf->nf_ref);
|
||||
__entry->nf_flags = nf->nf_flags;
|
||||
__entry->nf_may = nf->nf_may;
|
||||
__entry->nf_file = nf->nf_file;
|
||||
),
|
||||
TP_printk("hash=0x%x inode=%p ref=%d flags=%s may=%s file=%p",
|
||||
__entry->nf_hashval,
|
||||
TP_printk("inode=%p ref=%d flags=%s may=%s nf_file=%p",
|
||||
__entry->nf_inode,
|
||||
__entry->nf_ref,
|
||||
show_nf_flags(__entry->nf_flags),
|
||||
|
@ -784,15 +781,18 @@ DEFINE_NFSD_FILE_EVENT(nfsd_file_put);
|
|||
DEFINE_NFSD_FILE_EVENT(nfsd_file_unhash_and_release_locked);
|
||||
|
||||
TRACE_EVENT(nfsd_file_acquire,
|
||||
TP_PROTO(struct svc_rqst *rqstp, unsigned int hash,
|
||||
struct inode *inode, unsigned int may_flags,
|
||||
struct nfsd_file *nf, __be32 status),
|
||||
TP_PROTO(
|
||||
struct svc_rqst *rqstp,
|
||||
struct inode *inode,
|
||||
unsigned int may_flags,
|
||||
struct nfsd_file *nf,
|
||||
__be32 status
|
||||
),
|
||||
|
||||
TP_ARGS(rqstp, hash, inode, may_flags, nf, status),
|
||||
TP_ARGS(rqstp, inode, may_flags, nf, status),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(u32, xid)
|
||||
__field(unsigned int, hash)
|
||||
__field(void *, inode)
|
||||
__field(unsigned long, may_flags)
|
||||
__field(int, nf_ref)
|
||||
|
@ -804,7 +804,6 @@ TRACE_EVENT(nfsd_file_acquire,
|
|||
|
||||
TP_fast_assign(
|
||||
__entry->xid = be32_to_cpu(rqstp->rq_xid);
|
||||
__entry->hash = hash;
|
||||
__entry->inode = inode;
|
||||
__entry->may_flags = may_flags;
|
||||
__entry->nf_ref = nf ? refcount_read(&nf->nf_ref) : 0;
|
||||
|
@ -814,8 +813,8 @@ TRACE_EVENT(nfsd_file_acquire,
|
|||
__entry->status = be32_to_cpu(status);
|
||||
),
|
||||
|
||||
TP_printk("xid=0x%x hash=0x%x inode=%p may_flags=%s ref=%d nf_flags=%s nf_may=%s nf_file=%p status=%u",
|
||||
__entry->xid, __entry->hash, __entry->inode,
|
||||
TP_printk("xid=0x%x inode=%p may_flags=%s ref=%d nf_flags=%s nf_may=%s nf_file=%p status=%u",
|
||||
__entry->xid, __entry->inode,
|
||||
show_nfsd_may_flags(__entry->may_flags),
|
||||
__entry->nf_ref, show_nf_flags(__entry->nf_flags),
|
||||
show_nfsd_may_flags(__entry->nf_may),
|
||||
|
@ -826,7 +825,6 @@ TRACE_EVENT(nfsd_file_open,
|
|||
TP_PROTO(struct nfsd_file *nf, __be32 status),
|
||||
TP_ARGS(nf, status),
|
||||
TP_STRUCT__entry(
|
||||
__field(unsigned int, nf_hashval)
|
||||
__field(void *, nf_inode) /* cannot be dereferenced */
|
||||
__field(int, nf_ref)
|
||||
__field(unsigned long, nf_flags)
|
||||
|
@ -834,15 +832,13 @@ TRACE_EVENT(nfsd_file_open,
|
|||
__field(void *, nf_file) /* cannot be dereferenced */
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->nf_hashval = nf->nf_hashval;
|
||||
__entry->nf_inode = nf->nf_inode;
|
||||
__entry->nf_ref = refcount_read(&nf->nf_ref);
|
||||
__entry->nf_flags = nf->nf_flags;
|
||||
__entry->nf_may = nf->nf_may;
|
||||
__entry->nf_file = nf->nf_file;
|
||||
),
|
||||
TP_printk("hash=0x%x inode=%p ref=%d flags=%s may=%s file=%p",
|
||||
__entry->nf_hashval,
|
||||
TP_printk("inode=%p ref=%d flags=%s may=%s file=%p",
|
||||
__entry->nf_inode,
|
||||
__entry->nf_ref,
|
||||
show_nf_flags(__entry->nf_flags),
|
||||
|
@ -851,26 +847,27 @@ TRACE_EVENT(nfsd_file_open,
|
|||
)
|
||||
|
||||
DECLARE_EVENT_CLASS(nfsd_file_search_class,
|
||||
TP_PROTO(struct inode *inode, unsigned int hash, int found),
|
||||
TP_ARGS(inode, hash, found),
|
||||
TP_PROTO(
|
||||
struct inode *inode,
|
||||
int found
|
||||
),
|
||||
TP_ARGS(inode, found),
|
||||
TP_STRUCT__entry(
|
||||
__field(struct inode *, inode)
|
||||
__field(unsigned int, hash)
|
||||
__field(int, found)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->inode = inode;
|
||||
__entry->hash = hash;
|
||||
__entry->found = found;
|
||||
),
|
||||
TP_printk("hash=0x%x inode=%p found=%d", __entry->hash,
|
||||
__entry->inode, __entry->found)
|
||||
TP_printk("inode=%p found=%d",
|
||||
__entry->inode, __entry->found)
|
||||
);
|
||||
|
||||
#define DEFINE_NFSD_FILE_SEARCH_EVENT(name) \
|
||||
DEFINE_EVENT(nfsd_file_search_class, name, \
|
||||
TP_PROTO(struct inode *inode, unsigned int hash, int found), \
|
||||
TP_ARGS(inode, hash, found))
|
||||
TP_PROTO(struct inode *inode, int found), \
|
||||
TP_ARGS(inode, found))
|
||||
|
||||
DEFINE_NFSD_FILE_SEARCH_EVENT(nfsd_file_close_inode_sync);
|
||||
DEFINE_NFSD_FILE_SEARCH_EVENT(nfsd_file_close_inode);
|
||||
|
|
Loading…
Reference in New Issue