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