mirror of
https://github.com/ceph/ceph
synced 2025-01-19 17:41:39 +00:00
client/fuse: add support for 3.12 API of libfuse
Signed-off-by: Zhansong Gao <zhsgao@hotmail.com>
This commit is contained in:
parent
70425c75df
commit
2f224e2993
@ -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,
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user