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