8 Star 0 Fork 5

src-anolis-os/glusterfs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0049-transport-socket-log-shutdown-msg-occasionally.patch 1.87 KB
一键复制 编辑 原始数据 按行查看 历史
张彬琛 提交于 2021-01-20 13:34 . import glusterfs-6.0-20.el8.src.rpm
From e205516ef874d617e4756856098bf10e17b0ea3d Mon Sep 17 00:00:00 2001
From: Raghavendra G <[email protected]>
Date: Fri, 22 Mar 2019 10:40:45 +0530
Subject: [PATCH 49/52] transport/socket: log shutdown msg occasionally
>Change-Id: If3fc0884e7e2f45de2d278b98693b7a473220a5f
>Signed-off-by: Raghavendra G <[email protected]>
>Fixes: bz#1691616
BUG: 1691620
Change-Id: If3fc0884e7e2f45de2d278b98693b7a473220a5f
Signed-off-by: Sunil Kumar Acharya <[email protected]>
Reviewed-on: https://code.engineering.redhat.com/gerrit/167088
Tested-by: RHGS Build Bot <[email protected]>
---
rpc/rpc-transport/socket/src/socket.c | 4 ++--
rpc/rpc-transport/socket/src/socket.h | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index 121d46b..f6de1d3 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -807,8 +807,8 @@ __socket_shutdown(rpc_transport_t *this)
gf_log(this->name, GF_LOG_DEBUG, "shutdown() returned %d. %s", ret,
strerror(errno));
} else {
- gf_log(this->name, GF_LOG_INFO, "intentional socket shutdown(%d)",
- priv->sock);
+ GF_LOG_OCCASIONALLY(priv->shutdown_log_ctr, this->name, GF_LOG_INFO,
+ "intentional socket shutdown(%d)", priv->sock);
}
return ret;
diff --git a/rpc/rpc-transport/socket/src/socket.h b/rpc/rpc-transport/socket/src/socket.h
index 32339d3..e1ccae2 100644
--- a/rpc/rpc-transport/socket/src/socket.h
+++ b/rpc/rpc-transport/socket/src/socket.h
@@ -219,6 +219,7 @@ typedef struct {
int keepalivecnt;
int timeout;
int log_ctr;
+ int shutdown_log_ctr;
/* ssl_error_required is used only during the SSL connection setup
* phase.
* It holds the error code returned by SSL_get_error() and is used to
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/glusterfs.git
[email protected]:src-anolis-os/glusterfs.git
src-anolis-os
glusterfs
glusterfs
a8

搜索帮助