From dfb2068e671342e3b74ecd469e5d43ef5a0a1f8b Mon Sep 17 00:00:00 2001 From: huanwen ren Date: Wed, 3 Jul 2019 00:20:23 +0800 Subject: [PATCH] client: support the fallocate() when fuse version >= 2.9 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 --- src/client/fuse_ll.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/fuse_ll.cc b/src/client/fuse_ll.cc index 9cf2379a44051..63b993bebc72b 100644 --- a/src/client/fuse_ll.cc +++ b/src/client/fuse_ll.cc @@ -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 }; -- 2.39.5