]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client/fuse: add support for 3.12 API of libfuse 49098/head
authorZhansong Gao <zhsgao@hotmail.com>
Tue, 6 Dec 2022 17:04:17 +0000 (01:04 +0800)
committerZhansong Gao <zhsgao@hotmail.com>
Tue, 6 Dec 2022 17:04:17 +0000 (01:04 +0800)
Signed-off-by: Zhansong Gao <zhsgao@hotmail.com>
src/client/fuse_ll.cc
src/include/ceph_fuse.h

index 517eb79ce8c2d9ff5ae95b516332e6c205e839b0..7f92dd668ba3eaaeb5ae78866a1f71de1e8af03c 100644 (file)
@@ -1603,7 +1603,21 @@ int CephFuse::Handle::loop()
   auto fuse_multithreaded = client->cct->_conf.get_val<bool>(
     "fuse_multithreaded");
   if (fuse_multithreaded) {
-#if FUSE_VERSION >= FUSE_MAKE_VERSION(3, 1)
+#if FUSE_VERSION >= FUSE_MAKE_VERSION(3, 12)
+    {
+      struct fuse_loop_config *conf = fuse_loop_cfg_create();
+      ceph_assert(conf != nullptr);
+
+      fuse_loop_cfg_set_clone_fd(conf, opts.clone_fd);
+      fuse_loop_cfg_set_idle_threads(conf, opts.max_idle_threads);
+      fuse_loop_cfg_set_max_threads(conf, opts.max_threads);
+
+      int r = fuse_session_loop_mt(se, conf);
+
+      fuse_loop_cfg_destroy(conf);
+      return r;
+    }
+#elif FUSE_VERSION >= FUSE_MAKE_VERSION(3, 1)
     {
       struct fuse_loop_config conf = {
         clone_fd: opts.clone_fd,
index c95fd19408c257b84d04978455a16ac7fbe3d973..cfa8097bb4c507dd666a1cb5062e630f8c4f7979 100644 (file)
@@ -20,7 +20,7 @@
  * fuse.h is included.
  */
 #ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION       35
+#define FUSE_USE_VERSION       312
 #endif
 
 #include <fuse.h>