summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2017-01-13 14:46:17 +0100
committerShyamsundar Ranganathan <srangana@redhat.com>2017-05-17 23:25:54 +0000
commit8eceda342eb4b5581b5eb6cc43f8f1e758975809 (patch)
treeed4656afb8831427aefa5075aa986f8bbf145e56 /xlators
parent0533eb3c4af148d588bddd6ed967f253f99b8e33 (diff)
nfs/nlm: log the caller_name if nlm_client_t can be found
In order to help tracking possible misbehaving clients down, log the 'caller_name' (hostname of the NFS client) that does not have a matching nlm_client_t structure. Cherry picked from commit 9bfb74a39954a7e63bfd762c816efc7e64b9df65: > Change-Id: Ib514a78d1809719a3d0274acc31ee632727d746d > BUG: 1381970 > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: https://review.gluster.org/17186 > Smoke: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: soumya k <skoduri@redhat.com> > Reviewed-by: Jeff Darcy <jeff@pl.atyp.us> Change-Id: Ib514a78d1809719a3d0274acc31ee632727d746d BUG: 1450377 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: https://review.gluster.org/17266 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/nfs/server/src/nlm4.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/nfs/server/src/nlm4.c b/xlators/nfs/server/src/nlm4.c
index dcb1784127e..ed8684fdca2 100644
--- a/xlators/nfs/server/src/nlm4.c
+++ b/xlators/nfs/server/src/nlm4.c
@@ -1732,18 +1732,20 @@ nlm4_unlock_resume (void *carg)
int ret = -1;
nfs3_call_state_t *cs = NULL;
nlm_client_t *nlmclnt = NULL;
+ char *caller_name = NULL;
if (!carg)
return ret;
cs = (nfs3_call_state_t *)carg;
nlm4_check_fh_resolve_status (cs, stat, nlm4err);
+ caller_name = cs->args.nlm4_unlockargs.alock.caller_name;
- nlmclnt = nlm_get_uniq (cs->args.nlm4_unlockargs.alock.caller_name);
+ nlmclnt = nlm_get_uniq (caller_name);
if (nlmclnt == NULL) {
stat = nlm4_granted;
gf_msg (GF_NLM, GF_LOG_WARNING, ENOLCK, NFS_MSG_NO_MEMORY,
- "nlm_get_uniq() returned NULL");
+ "nlm_get_uniq() returned NULL for %s", caller_name);
goto nlm4err;
}
cs->fd = fd_lookup_uint64 (cs->resolvedloc.inode, (uint64_t)nlmclnt);