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