]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
client: support the fallocate() when fuse version >= 2.9
authorhuanwen ren <ren.huanwen@zte.com.cn>
Tue, 2 Jul 2019 16:20:23 +0000 (00:20 +0800)
committerhuanwen ren <ren.huanwen@zte.com.cn>
Tue, 2 Jul 2019 16:20:23 +0000 (00:20 +0800)
You can see that libfuse already supports the fallocate() function call in version 2.9,
see https://github.com/libfuse/libfuse/blob/fuse_2_9_bugfix/include/fuse_lowlevel.h,
At the same time, the fuse version currently used in the 3.10 kernel is mostly 2.9,
so it is necessary to fix this feature.

Fixes: http://tracker.ceph.com/issues/40615
Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
src/client/fuse_ll.cc

index 9cf2379a440517dc70ea1019e1ae61504ecc38b7..63b993bebc72bf6176ea2427b680a4a8388eb7ce 100644 (file)
@@ -657,7 +657,7 @@ static void fuse_ll_ioctl(fuse_req_t req, fuse_ino_t ino, int cmd, void *arg, st
 }
 #endif
 
-#if FUSE_VERSION > FUSE_MAKE_VERSION(2, 9)
+#if FUSE_VERSION >= FUSE_MAKE_VERSION(2, 9)
 
 static void fuse_ll_fallocate(fuse_req_t req, fuse_ino_t ino, int mode,
                               off_t offset, off_t length,
@@ -1036,7 +1036,7 @@ const static struct fuse_lowlevel_ops fuse_ll_oper = {
  forget_multi: 0,
  flock: fuse_ll_flock,
 #endif
-#if FUSE_VERSION > FUSE_MAKE_VERSION(2, 9)
+#if FUSE_VERSION >= FUSE_MAKE_VERSION(2, 9)
  fallocate: fuse_ll_fallocate
 #endif
 };