From 1fbed11ead209a8bcd1fd65846e0dfac6d5e1f2d Mon Sep 17 00:00:00 2001 From: Rajesh Amaravathi Date: Tue, 14 Feb 2012 16:28:44 +0530 Subject: 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 Reviewed-on: http://review.gluster.com/2747 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi --- xlators/protocol/client/src/client-lk.c | 7 ++++--- 1 file 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; } -- cgit