summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-transport
diff options
context:
space:
mode:
authorMohit Agrawal <moagrawa@redhat.com>2016-10-03 10:55:23 +0530
committerRaghavendra G <rgowdapp@redhat.com>2016-10-12 23:59:37 -0700
commit070145750006c87099f945b4990a4460d814c21f (patch)
treec42be1454d48fa294af7fa4454827223742d1f0e /rpc/rpc-transport
parentf0c588e5e6fa1552325a31e0e01704ecf063c7e1 (diff)
rpc/socket.c : Modify gf_log message in socket_poller code in case of error
Problem: In case of SSL after stopping the volume if client(mount point) is still trying to write the data on socket then it will throw an EIO error on that socket and given this log message is captured at every attempt this would flood the log file. Solution: To reduce the frequency of stored log message use GF_LOG_OCCASIONALLY instead of gf_log. BUG: 1381115 Change-Id: I66151d153c2cbfb017b3ebc4c52162278c0f537c Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Reviewed-on: http://review.gluster.org/15605 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: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'rpc/rpc-transport')
-rw-r--r--rpc/rpc-transport/socket/src/socket.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index ba6c5931480..89817b663df 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -2407,7 +2407,7 @@ out:
return ret;
}
-
+static int poll_err_cnt;
static void *
socket_poller (void *ctx)
{
@@ -2543,8 +2543,11 @@ socket_poller (void *ctx)
break;
}
if (ret < 0 && errno != ENODATA) {
- gf_log(this->name,GF_LOG_ERROR,
- "error in polling loop");
+ GF_LOG_OCCASIONALLY (poll_err_cnt, this->name,
+ GF_LOG_ERROR,
+ "socket_poller %s failed (%s)",
+ this->peerinfo.identifier,
+ strerror (errno));
break;
}
if (priv->ot_gen != gen) {