summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/src/fuse-bridge.h
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2015-07-06 00:01:44 +0200
committerRaghavendra G <rgowdapp@redhat.com>2016-02-10 22:16:50 -0800
commite501a7da4c50e2a2049a71119c25ed43b43f3395 (patch)
tree24bd91edea724e1820f8b4a8cb65801a2629b551 /xlators/mount/fuse/src/fuse-bridge.h
parentb8bd9a6e6e3f50ede4c25dcfc0a05aad53e66c79 (diff)
fuse: add support for SEEK_HOLE and SEEK_DATA through lseek()
The Linux FUSE kernel module has gained support for passing SEEK_HOLE and SEEK_DATA on through lseek(). This can greatly improve performance when working with sparse files. Linux FUSE introduced support for lseek() with version 4.5. The commit in mainline Linux is 0b5da8db145bfd44266ac964a2636a0cf8d7c286. URL: http://thread.gmane.org/gmane.comp.file-systems.fuse.devel/14752 Change-Id: I12496d788e59461a3023ddd30e0ea3179007f77e BUG: 1220173 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11474 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/mount/fuse/src/fuse-bridge.h')
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.h b/xlators/mount/fuse/src/fuse-bridge.h
index d337ea08539..1da04c57f8f 100644
--- a/xlators/mount/fuse/src/fuse-bridge.h
+++ b/xlators/mount/fuse/src/fuse-bridge.h
@@ -41,7 +41,7 @@
#include "gidcache.h"
#if defined(GF_LINUX_HOST_OS) || defined(__FreeBSD__) || defined(__NetBSD__)
-#define FUSE_OP_HIGH (FUSE_READDIRPLUS + 1)
+#define FUSE_OP_HIGH (FUSE_LSEEK + 1)
#endif
#ifdef GF_DARWIN_HOST_OS
#define FUSE_OP_HIGH (FUSE_DESTROY + 1)
@@ -380,6 +380,8 @@ typedef struct {
uuid_t gfid;
uint32_t io_flags;
int32_t fd_no;
+
+ gf_seek_what_t whence;
} fuse_state_t;
typedef struct {