diff --git a/fusetrace/fusetrace_ll.cc b/fusetrace/fusetrace_ll.cc index b411a83fe2038..f10c29fd22e9e 100644 --- a/fusetrace/fusetrace_ll.cc +++ b/fusetrace/fusetrace_ll.cc @@ -11,8 +11,6 @@ gcc -Wall `pkg-config fuse --cflags --libs` -lulockmgr fusexmp_fh.c -o fusexmp_fh */ -#define FUSE_USE_VERSION 30 - #ifdef HAVE_CONFIG_H #include #endif diff --git a/src/ceph_fuse.cc b/src/ceph_fuse.cc index 02aed32ac6994..26bdfbbe9fc7d 100644 --- a/src/ceph_fuse.cc +++ b/src/ceph_fuse.cc @@ -42,9 +42,8 @@ #include #include -#include -#include #include "include/ceph_fuse.h" +#include #define dout_context g_ceph_context diff --git a/src/client/fuse_ll.cc b/src/client/fuse_ll.cc index 600cfbdd25514..3b2118bdcdde3 100644 --- a/src/client/fuse_ll.cc +++ b/src/client/fuse_ll.cc @@ -37,7 +37,6 @@ #include "include/ceph_fuse.h" #include "fuse_ll.h" -#include #include #define dout_context g_ceph_context @@ -1262,7 +1261,14 @@ int CephFuse::Handle::loop() auto fuse_multithreaded = client->cct->_conf.get_val( "fuse_multithreaded"); if (fuse_multithreaded) { -#if FUSE_VERSION >= FUSE_MAKE_VERSION(3, 0) +#if FUSE_VERSION >= FUSE_MAKE_VERSION(3, 1) + { + struct fuse_loop_config conf = { 0 }; + + conf.clone_fd = opts.clone_fd; + return fuse_session_loop_mt(se, &conf); + } +#elif FUSE_VERSION >= FUSE_MAKE_VERSION(3, 0) return fuse_session_loop_mt(se, opts.clone_fd); #else return fuse_session_loop_mt(se); diff --git a/src/client/fuse_ll.h b/src/client/fuse_ll.h index 3d7b891ddb44a..85e587baf46b5 100644 --- a/src/client/fuse_ll.h +++ b/src/client/fuse_ll.h @@ -12,8 +12,6 @@ * */ -#define FUSE_USE_VERSION 30 - class CephFuse { public: CephFuse(Client *c, int fd); diff --git a/src/include/ceph_fuse.h b/src/include/ceph_fuse.h index ae504f6715de4..c95fd19408c25 100644 --- a/src/include/ceph_fuse.h +++ b/src/include/ceph_fuse.h @@ -14,7 +14,15 @@ #ifndef CEPH_FUSE_H #define CEPH_FUSE_H -#define FUSE_USE_VERSION 30 +/* + * The API version that we want to use, regardless of what the + * library version is. Note that this must be defined before + * fuse.h is included. + */ +#ifndef FUSE_USE_VERSION +#define FUSE_USE_VERSION 35 +#endif + #include #include "acconfig.h" diff --git a/src/os/FuseStore.cc b/src/os/FuseStore.cc index 35755f737f17d..8845d9f08063e 100644 --- a/src/os/FuseStore.cc +++ b/src/os/FuseStore.cc @@ -2,15 +2,13 @@ // vim: ts=8 sw=2 smarttab #include "include/compat.h" +#include "include/ceph_fuse.h" #include "FuseStore.h" #include "os/ObjectStore.h" #include "include/stringify.h" #include "common/errno.h" -#define FUSE_USE_VERSION 30 -#include #include -#include "include/ceph_fuse.h" #include #include diff --git a/src/rbd_fuse/rbd-fuse.cc b/src/rbd_fuse/rbd-fuse.cc index e7c8166542a7d..6d6db311929c5 100644 --- a/src/rbd_fuse/rbd-fuse.cc +++ b/src/rbd_fuse/rbd-fuse.cc @@ -1,8 +1,6 @@ /* * rbd-fuse */ -#define FUSE_USE_VERSION 30 - #include "include/int_types.h" #include @@ -11,7 +9,6 @@ #include #include #include -#include #include #include #include