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