summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
authorRajesh Amaravathi <rajesh@redhat.com>2012-02-14 16:28:44 +0530
committerVijay Bellur <vijay@gluster.com>2012-02-14 10:25:30 -0800
commit1fbed11ead209a8bcd1fd65846e0dfac6d5e1f2d (patch)
treeb86e71ee766221c7d5939fb4a60189e63c49baeb /xlators/protocol
parent22d2abe742a67f1700f0f8f2a6449f3640826b27 (diff)
nfs: avoid logging invalid fdctx in case of anonymous fds
if get_fd_ctx fails (as in case of anonymous fds), overwhelming amount of entries are seen in the nfs log, causing dd and other heavy i/o operations to become unresponsive. this patch logs an invalid fdctx only if it is not an anonymous fd. Change-Id: I4e917d150d6a053af77d47a94a2f1c2633acadb5 BUG: 787365 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/2747 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/protocol')
-rw-r--r--xlators/protocol/client/src/client-lk.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/protocol/client/src/client-lk.c b/xlators/protocol/client/src/client-lk.c
index d08d2a413..1bdde87df 100644
--- a/xlators/protocol/client/src/client-lk.c
+++ b/xlators/protocol/client/src/client-lk.c
@@ -362,7 +362,7 @@ destroy_client_lock (client_posix_lock_t *lock)
int32_t
delete_granted_locks_owner (fd_t *fd, gf_lkowner_t *owner)
{
- clnt_fd_ctx_t *fdctx = NULL;
+ clnt_fd_ctx_t *fdctx = NULL;
client_posix_lock_t *lock = NULL;
client_posix_lock_t *tmp = NULL;
xlator_t *this = NULL;
@@ -375,8 +375,9 @@ delete_granted_locks_owner (fd_t *fd, gf_lkowner_t *owner)
this = THIS;
fdctx = this_fd_get_ctx (fd, this);
if (!fdctx) {
- gf_log (this->name, GF_LOG_WARNING,
- "fdctx not valid");
+ if (!fd_is_anonymous (fd))
+ gf_log (this->name, GF_LOG_WARNING,
+ "fdctx not valid");
ret = -1;
goto out;
}