14f8ab
From 4901fcc0cc507accf30e1a4bdd020a5676488751 Mon Sep 17 00:00:00 2001
14f8ab
From: Niels de Vos <ndevos@redhat.com>
14f8ab
Date: Mon, 8 Apr 2019 12:14:34 +0200
14f8ab
Subject: [PATCH 115/124] core: only log seek errors if SEEK_HOLE/SEEK_DATA is
14f8ab
 available
14f8ab
14f8ab
On RHEL-6 there is no support for SEEK_HOLE/SEEK_DATA and this causes
14f8ab
the POSIX xlator to return errno=EINVAL. Because of this, the rpc-server
14f8ab
xlator will log all 'failed' seek attempts. When applications call
14f8ab
seek() often, the brick logs can grow very quickly and fill up the
14f8ab
disks.
14f8ab
14f8ab
Messages that get logged are like
14f8ab
[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]
14f8ab
14f8ab
The problem can be reproduced by running a Gluster Server on RHEL-6,
14f8ab
with a client running on RHEL-7. The client should execute an
14f8ab
application that calls lseek() with SEEK_HOLE/SEEK_DATA.
14f8ab
14f8ab
>Change-Id: I7b6c16f8e0ba1a183e845cfdb8d5a3f8caeab138
14f8ab
>Fixes: bz#1697316
14f8ab
>Signed-off-by: Niels de Vos <ndevos@redhat.com>
14f8ab
14f8ab
upstream patch: https://review.gluster.org/#/c/glusterfs/+/22526/
14f8ab
14f8ab
BUG: 1696903
14f8ab
Change-Id: I7b6c16f8e0ba1a183e845cfdb8d5a3f8caeab138
14f8ab
Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
14f8ab
Reviewed-on: https://code.engineering.redhat.com/gerrit/168527
14f8ab
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
14f8ab
Tested-by: RHGS Build Bot <nigelb@redhat.com>
14f8ab
---
14f8ab
 libglusterfs/src/common-utils.c | 4 ++++
14f8ab
 1 file changed, 4 insertions(+)
14f8ab
14f8ab
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
14f8ab
index a0c83c0..70d5d21 100644
14f8ab
--- a/libglusterfs/src/common-utils.c
14f8ab
+++ b/libglusterfs/src/common-utils.c
14f8ab
@@ -4500,9 +4500,13 @@ fop_log_level(glusterfs_fop_t fop, int op_errno)
14f8ab
             return GF_LOG_DEBUG;
14f8ab
 
14f8ab
     if (fop == GF_FOP_SEEK) {
14f8ab
+#ifdef HAVE_SEEK_HOLE
14f8ab
         if (op_errno == ENXIO) {
14f8ab
             return GF_LOG_DEBUG;
14f8ab
         }
14f8ab
+#else
14f8ab
+        return GF_LOG_DEBUG;
14f8ab
+#endif
14f8ab
     }
14f8ab
 
14f8ab
     return GF_LOG_ERROR;
14f8ab
-- 
14f8ab
1.8.3.1
14f8ab