From: Kefu Chai Date: Thu, 28 Jan 2016 09:45:30 +0000 (+0800) Subject: osd: disable FuseStore if !HAVE_LIBFUSE X-Git-Tag: v10.0.4~143^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b2e5c55886674293384ea08f599d3ffa016afbb4;p=ceph-ci.git osd: disable FuseStore if !HAVE_LIBFUSE Signed-off-by: Kefu Chai --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index e4597583573..e02aac6c316 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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(); } diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 6faa5771abd..4d274cfb139 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -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;