Skip to content

Commit

Permalink
Merge PR ceph#35368 into master
Browse files Browse the repository at this point in the history
* refs/pull/35368/head:
	fuse: update to newer FUSE_USE_VERSION

Reviewed-by: Xiubo Li <[email protected]>
Reviewed-by: Milind Changire <[email protected]>
Reviewed-by: Patrick Donnelly <[email protected]>
  • Loading branch information
batrick committed Jun 12, 2020
2 parents ef69405 + cfbc0fb commit b40d5ee
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 15 deletions.
1 change: 1 addition & 0 deletions .githubmap
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,4 @@ lxbsz Xiubo Li <[email protected]>
asettle Alexandra Settle <[email protected]>
vumrao Vikhyat Umrao <[email protected]>
saschagrunert Sascha Grunert <[email protected]>
mchangir Milind Changire <[email protected]>
2 changes: 0 additions & 2 deletions fusetrace/fusetrace_ll.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <config.h>
#endif
Expand Down
3 changes: 1 addition & 2 deletions src/ceph_fuse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@
#include <sys/types.h>
#include <fcntl.h>

#include <fuse.h>
#include <fuse_lowlevel.h>
#include "include/ceph_fuse.h"
#include <fuse_lowlevel.h>

#define dout_context g_ceph_context

Expand Down
10 changes: 8 additions & 2 deletions src/client/fuse_ll.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include "include/ceph_fuse.h"

#include "fuse_ll.h"
#include <fuse.h>
#include <fuse_lowlevel.h>

#define dout_context g_ceph_context
Expand Down Expand Up @@ -1262,7 +1261,14 @@ 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, 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);
Expand Down
2 changes: 0 additions & 2 deletions src/client/fuse_ll.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
*
*/

#define FUSE_USE_VERSION 30

class CephFuse {
public:
CephFuse(Client *c, int fd);
Expand Down
10 changes: 9 additions & 1 deletion src/include/ceph_fuse.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <fuse.h>
#include "acconfig.h"

Expand Down
4 changes: 1 addition & 3 deletions src/os/FuseStore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <fuse.h>
#include <fuse_lowlevel.h>
#include "include/ceph_fuse.h"

#include <sys/types.h>
#include <sys/stat.h>
Expand Down
3 changes: 0 additions & 3 deletions src/rbd_fuse/rbd-fuse.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/*
* rbd-fuse
*/
#define FUSE_USE_VERSION 30

#include "include/int_types.h"

#include <stdio.h>
Expand All @@ -11,7 +9,6 @@
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <fuse.h>
#include <pthread.h>
#include <string.h>
#include <sys/types.h>
Expand Down

0 comments on commit b40d5ee

Please sign in to comment.