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