]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: disable FuseStore if !HAVE_LIBFUSE
authorKefu Chai <kchai@redhat.com>
Thu, 28 Jan 2016 09:45:30 +0000 (17:45 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 28 Jan 2016 15:36:45 +0000 (23:36 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/osd/OSD.cc
src/osd/OSD.h

index e459758357301c583a4a8eec19f56692cb8e4546..e02aac6c316991d7b7a0b4d58e71f9dd6b8e9bc9 100644 (file)
@@ -44,7 +44,9 @@
 #include "common/io_priority.h"
 
 #include "os/ObjectStore.h"
+#ifdef HAVE_LIBFUSE
 #include "os/FuseStore.h"
+#endif
 
 #include "ReplicatedPG.h"
 
@@ -1550,7 +1552,6 @@ OSD::OSD(CephContext *cct_, ObjectStore *store_,
   logger(NULL),
   recoverystate_perf(NULL),
   store(store_),
-  fuse_store(NULL),
   log_client(cct, client_messenger, &mc->monmap, LogClient::NO_FLAGS),
   clog(log_client.create_channel()),
   whoami(id),
@@ -1814,6 +1815,7 @@ public:
 
 int OSD::enable_disable_fuse(bool stop)
 {
+#ifdef HAVE_LIBFUSE
   int r;
   string mntpath = g_conf->osd_data + "/fuse";
   if (fuse_store && (stop || !g_conf->osd_objectstore_fuse)) {
@@ -1848,6 +1850,7 @@ int OSD::enable_disable_fuse(bool stop)
       return r;
     }
   }
+#endif  // HAVE_LIBFUSE
   return 0;
 }
 
@@ -8684,12 +8687,13 @@ void OSD::handle_conf_change(const struct md_config_t *conf,
       changed.count("clog_to_syslog_facility")) {
     update_log_config();
   }
+#ifdef HAVE_LIBFUSE
   if (changed.count("osd_objectstore_fuse")) {
     if (store) {
       enable_disable_fuse(false);
     }
   }
-
+#endif
   check_config();
 }
 
index 6faa5771abd435dc4cac28f71fefeed66cc68823..4d274cfb13993873c75fae6e7b7a758352ff36e2 100644 (file)
@@ -1080,8 +1080,9 @@ protected:
   PerfCounters      *logger;
   PerfCounters      *recoverystate_perf;
   ObjectStore *store;
-  FuseStore *fuse_store;
-
+#ifdef HAVE_LIBFUSE
+  FuseStore *fuse_store = nullptr;
+#endif
   LogClient log_client;
   LogChannelRef clog;