From: huanwen ren Date: Tue, 2 Jul 2019 16:20:23 +0000 (+0800) Subject: client: support the fallocate() when fuse version >= 2.9 X-Git-Tag: v15.1.0~2212^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dfb2068e671342e3b74ecd469e5d43ef5a0a1f8b;p=ceph-ci.git 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 --- diff --git a/src/client/fuse_ll.cc b/src/client/fuse_ll.cc index 9cf2379a440..63b993bebc7 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 };