NFSD: Add nfsd_clid_confirmed tracepoint
[ Upstream commit 7e3b32ace6094aadfa2e1e54ca4c6bbfd07646af ] This replaces a dprintk call site in order to get greater visibility on when client IDs are confirmed or re-used. Simple example: nfsd-995 [000] 126.622975: nfsd_compound: xid=0x3a34e2b1 opcnt=1 nfsd-995 [000] 126.623005: nfsd_cb_args: addr=192.168.2.51:45901 client 60958e3b:9213ef0e prog=1073741824 ident=1 nfsd-995 [000] 126.623007: nfsd_compound_status: op=1/1 OP_SETCLIENTID status=0 nfsd-996 [001] 126.623142: nfsd_compound: xid=0x3b34e2b1 opcnt=1 >>>> nfsd-996 [001] 126.623146: nfsd_clid_confirmed: client 60958e3b:9213ef0e nfsd-996 [001] 126.623148: nfsd_cb_probe: addr=192.168.2.51:45901 client 60958e3b:9213ef0e state=UNKNOWN nfsd-996 [001] 126.623154: nfsd_compound_status: op=1/1 OP_SETCLIENTID_CONFIRM status=0 Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a91996a12e
commit
b1e31ba5ce
2 changed files with 6 additions and 5 deletions
|
@ -2838,14 +2838,14 @@ move_to_confirmed(struct nfs4_client *clp)
|
||||||
|
|
||||||
lockdep_assert_held(&nn->client_lock);
|
lockdep_assert_held(&nn->client_lock);
|
||||||
|
|
||||||
dprintk("NFSD: move_to_confirm nfs4_client %p\n", clp);
|
|
||||||
list_move(&clp->cl_idhash, &nn->conf_id_hashtbl[idhashval]);
|
list_move(&clp->cl_idhash, &nn->conf_id_hashtbl[idhashval]);
|
||||||
rb_erase(&clp->cl_namenode, &nn->unconf_name_tree);
|
rb_erase(&clp->cl_namenode, &nn->unconf_name_tree);
|
||||||
add_clp_to_name_tree(clp, &nn->conf_name_tree);
|
add_clp_to_name_tree(clp, &nn->conf_name_tree);
|
||||||
if (!test_and_set_bit(NFSD4_CLIENT_CONFIRMED, &clp->cl_flags) &&
|
if (!test_and_set_bit(NFSD4_CLIENT_CONFIRMED, &clp->cl_flags)) {
|
||||||
clp->cl_nfsd_dentry &&
|
trace_nfsd_clid_confirmed(&clp->cl_clientid);
|
||||||
clp->cl_nfsd_info_dentry)
|
if (clp->cl_nfsd_dentry && clp->cl_nfsd_info_dentry)
|
||||||
fsnotify_dentry(clp->cl_nfsd_info_dentry, FS_MODIFY);
|
fsnotify_dentry(clp->cl_nfsd_info_dentry, FS_MODIFY);
|
||||||
|
}
|
||||||
renew_client_locked(clp);
|
renew_client_locked(clp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -511,6 +511,7 @@ DEFINE_EVENT(nfsd_clientid_class, nfsd_clid_##name, \
|
||||||
TP_PROTO(const clientid_t *clid), \
|
TP_PROTO(const clientid_t *clid), \
|
||||||
TP_ARGS(clid))
|
TP_ARGS(clid))
|
||||||
|
|
||||||
|
DEFINE_CLIENTID_EVENT(confirmed);
|
||||||
DEFINE_CLIENTID_EVENT(expired);
|
DEFINE_CLIENTID_EVENT(expired);
|
||||||
DEFINE_CLIENTID_EVENT(purged);
|
DEFINE_CLIENTID_EVENT(purged);
|
||||||
DEFINE_CLIENTID_EVENT(renew);
|
DEFINE_CLIENTID_EVENT(renew);
|
||||||
|
|
Loading…
Add table
Reference in a new issue