diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2021-05-14 22:55:36 +0300 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2021-05-18 20:44:03 +0300 |
commit | 744ea54c869cebe41fbad5f53f8a8ca5d93a5c97 (patch) | |
tree | adb7fc452412189acacde5ae3c77fe6c5fb44d81 /fs/nfsd/nfs4state.c | |
parent | 27787733ef44332fce749aa853f2749d141982b0 (diff) | |
download | linux-744ea54c869cebe41fbad5f53f8a8ca5d93a5c97.tar.xz |
NFSD: Add nfsd_clid_verf_mismatch tracepoint
Record when a client presents a different boot verifier than the
one we know about. Typically this is a sign the client has
rebooted, but sometimes it signals a conflicting client ID, which
the client's administrator will need to address.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 84c4021b3826..69405cc9d823 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -3191,6 +3191,7 @@ nfsd4_exchange_id(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, goto out_copy; } /* case 5, client reboot */ + trace_nfsd_clid_verf_mismatch(conf, rqstp, &verf); conf = NULL; goto out_new; } @@ -3986,9 +3987,13 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, if (unconf) unhash_client_locked(unconf); /* We need to handle only case 1: probable callback update */ - if (conf && same_verf(&conf->cl_verifier, &clverifier)) { - copy_clid(new, conf); - gen_confirm(new, nn); + if (conf) { + if (same_verf(&conf->cl_verifier, &clverifier)) { + copy_clid(new, conf); + gen_confirm(new, nn); + } else + trace_nfsd_clid_verf_mismatch(conf, rqstp, + &clverifier); } new->cl_minorversion = 0; gen_callback(new, setclid, rqstp); |