summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2019-04-08 12:14:34 +0200
committerAmar Tumballi <amarts@redhat.com>2019-04-11 04:36:54 +0000
commit4bae0b170d5b4fafe4327b8263c1895316ba3696 (patch)
tree92ea1a564296837b26fc0e15510f4c6afae94bad
parent0496523d3c1ac874eeecbb0ecb6516d88438d3c9 (diff)
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 <ndevos@redhat.com>
-rw-r--r--libglusterfs/src/common-utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index a0c83c06f7e..70d5d21916f 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;