|
|
21ab4e |
From 03dd62ba55d42dfd6dc0014988c509e43ca8009e Mon Sep 17 00:00:00 2001
|
|
|
21ab4e |
From: Niels de Vos <ndevos@redhat.com>
|
|
|
21ab4e |
Date: Fri, 13 Jan 2017 14:46:17 +0100
|
|
|
21ab4e |
Subject: [PATCH 441/473] nfs/nlm: log the caller_name if nlm_client_t can be
|
|
|
21ab4e |
found
|
|
|
21ab4e |
|
|
|
21ab4e |
In order to help tracking possible misbehaving clients down, log the
|
|
|
21ab4e |
'caller_name' (hostname of the NFS client) that does not have a matching
|
|
|
21ab4e |
nlm_client_t structure.
|
|
|
21ab4e |
|
|
|
21ab4e |
Cherry picked from commit 9bfb74a39954a7e63bfd762c816efc7e64b9df65:
|
|
|
21ab4e |
> Change-Id: Ib514a78d1809719a3d0274acc31ee632727d746d
|
|
|
21ab4e |
> BUG: 1381970
|
|
|
21ab4e |
> Signed-off-by: Niels de Vos <ndevos@redhat.com>
|
|
|
21ab4e |
> Reviewed-on: https://review.gluster.org/17186
|
|
|
21ab4e |
> Smoke: Gluster Build System <jenkins@build.gluster.org>
|
|
|
21ab4e |
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
|
|
|
21ab4e |
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
|
|
|
21ab4e |
> Reviewed-by: soumya k <skoduri@redhat.com>
|
|
|
21ab4e |
> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
|
|
|
21ab4e |
|
|
|
21ab4e |
Change-Id: Ib514a78d1809719a3d0274acc31ee632727d746d
|
|
|
21ab4e |
Signed-off-by: Niels de Vos <ndevos@redhat.com>
|
|
|
21ab4e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/106033
|
|
|
21ab4e |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
21ab4e |
---
|
|
|
21ab4e |
xlators/nfs/server/src/nlm4.c | 6 ++++--
|
|
|
21ab4e |
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
21ab4e |
|
|
|
21ab4e |
diff --git a/xlators/nfs/server/src/nlm4.c b/xlators/nfs/server/src/nlm4.c
|
|
|
21ab4e |
index 0e4a4d8..903262e 100644
|
|
|
21ab4e |
--- a/xlators/nfs/server/src/nlm4.c
|
|
|
21ab4e |
+++ b/xlators/nfs/server/src/nlm4.c
|
|
|
21ab4e |
@@ -1736,18 +1736,20 @@ nlm4_unlock_resume (void *carg)
|
|
|
21ab4e |
int ret = -1;
|
|
|
21ab4e |
nfs3_call_state_t *cs = NULL;
|
|
|
21ab4e |
nlm_client_t *nlmclnt = NULL;
|
|
|
21ab4e |
+ char *caller_name = NULL;
|
|
|
21ab4e |
|
|
|
21ab4e |
if (!carg)
|
|
|
21ab4e |
return ret;
|
|
|
21ab4e |
|
|
|
21ab4e |
cs = (nfs3_call_state_t *)carg;
|
|
|
21ab4e |
nlm4_check_fh_resolve_status (cs, stat, nlm4err);
|
|
|
21ab4e |
+ caller_name = cs->args.nlm4_unlockargs.alock.caller_name;
|
|
|
21ab4e |
|
|
|
21ab4e |
- nlmclnt = nlm_get_uniq (cs->args.nlm4_unlockargs.alock.caller_name);
|
|
|
21ab4e |
+ nlmclnt = nlm_get_uniq (caller_name);
|
|
|
21ab4e |
if (nlmclnt == NULL) {
|
|
|
21ab4e |
stat = nlm4_granted;
|
|
|
21ab4e |
gf_msg (GF_NLM, GF_LOG_WARNING, ENOLCK, NFS_MSG_NO_MEMORY,
|
|
|
21ab4e |
- "nlm_get_uniq() returned NULL");
|
|
|
21ab4e |
+ "nlm_get_uniq() returned NULL for %s", caller_name);
|
|
|
21ab4e |
goto nlm4err;
|
|
|
21ab4e |
}
|
|
|
21ab4e |
cs->fd = fd_lookup_uint64 (cs->resolvedloc.inode, (uint64_t)nlmclnt);
|
|
|
21ab4e |
--
|
|
|
21ab4e |
1.8.3.1
|
|
|
21ab4e |
|