8 Star 0 Fork 5

src-anolis-os/glusterfs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0115-core-only-log-seek-errors-if-SEEK_HOLE-SEEK_DATA-is-.patch 2.00 KB
一键复制 编辑 原始数据 按行查看 历史
张彬琛 提交于 2021-01-20 13:34 . import glusterfs-6.0-20.el8.src.rpm
From 4901fcc0cc507accf30e1a4bdd020a5676488751 Mon Sep 17 00:00:00 2001
From: Niels de Vos <[email protected]>
Date: Mon, 8 Apr 2019 12:14:34 +0200
Subject: [PATCH 115/124] core: only log seek errors if SEEK_HOLE/SEEK_DATA is
available
On RHEL-6 there is no support for SEEK_HOLE/SEEK_DATA and this causes
the POSIX xlator to return errno=EINVAL. Because of this, the rpc-server
xlator will log all 'failed' seek attempts. When applications call
seek() often, the brick logs can grow very quickly and fill up the
disks.
Messages that get logged are like
[server-rpc-fops.c:2091:server_seek_cbk] 0-vol01-server: 4947: SEEK-2 (53920aee-062c-4598-aa50-2b4d7821b204), client: worker.example.com-7808-2019/02/08-18:04:57:903430-vol01-client-0-0-0, error-xlator: vol01-posix [Invalid argument]
The problem can be reproduced by running a Gluster Server on RHEL-6,
with a client running on RHEL-7. The client should execute an
application that calls lseek() with SEEK_HOLE/SEEK_DATA.
>Change-Id: I7b6c16f8e0ba1a183e845cfdb8d5a3f8caeab138
>Fixes: bz#1697316
>Signed-off-by: Niels de Vos <[email protected]>
upstream patch: https://review.gluster.org/#/c/glusterfs/+/22526/
BUG: 1696903
Change-Id: I7b6c16f8e0ba1a183e845cfdb8d5a3f8caeab138
Signed-off-by: Sunil Kumar Acharya <[email protected]>
Reviewed-on: https://code.engineering.redhat.com/gerrit/168527
Reviewed-by: Atin Mukherjee <[email protected]>
Tested-by: RHGS Build Bot <[email protected]>
---
libglusterfs/src/common-utils.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index a0c83c0..70d5d21 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -4500,9 +4500,13 @@ fop_log_level(glusterfs_fop_t fop, int op_errno)
return GF_LOG_DEBUG;
if (fop == GF_FOP_SEEK) {
+#ifdef HAVE_SEEK_HOLE
if (op_errno == ENXIO) {
return GF_LOG_DEBUG;
}
+#else
+ return GF_LOG_DEBUG;
+#endif
}
return GF_LOG_ERROR;
--
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

搜索帮助