src: sed -i 's/WITH_SEASTAR/WITH_CRIMSON/'

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
This commit is contained in:
Matan Breizman 2025-04-03 07:53:15 +00:00
parent 4034cae6b0
commit 23c33f69ff
87 changed files with 177 additions and 177 deletions

View File

@ -705,8 +705,8 @@ if (WITH_SYSTEM_ROCKSDB)
find_package(RocksDB 5.14 REQUIRED)
endif()
option(WITH_SEASTAR "Build seastar components")
set(HAVE_SEASTAR ${WITH_SEASTAR})
option(WITH_CRIMSON "Build seastar components")
set(HAVE_SEASTAR ${WITH_CRIMSON})
# Boost
option(WITH_SYSTEM_BOOST "require and build with system Boost" OFF)
@ -721,7 +721,7 @@ if(WITH_MGR)
list(APPEND BOOST_COMPONENTS
python${MGR_PYTHON_VERSION_MAJOR}${MGR_PYTHON_VERSION_MINOR})
endif()
if(WITH_SEASTAR)
if(WITH_CRIMSON)
list(APPEND BOOST_COMPONENTS timer)
endif()

View File

@ -1544,7 +1544,7 @@ cmake .. \
-DWITH_SYSTEM_QATZIP:BOOL=ON \
%endif
%if 0%{with seastar}
-DWITH_SEASTAR:BOOL=ON \
-DWITH_CRIMSON:BOOL=ON \
-DWITH_JAEGER:BOOL=OFF \
%endif
-DWITH_GRAFANA:BOOL=ON \

2
debian/rules vendored
View File

@ -12,7 +12,7 @@ ifneq (,$(findstring WITH_STATIC_LIBSTDCXX,$(CEPH_EXTRA_CMAKE_ARGS)))
# see http://tracker.ceph.com/issues/25209
export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions
endif
ifeq (,$(findstring WITH_SEASTAR,$(CEPH_EXTRA_CMAKE_ARGS)))
ifeq (,$(findstring WITH_CRIMSON,$(CEPH_EXTRA_CMAKE_ARGS)))
export CEPH_OSD_BASENAME = ceph-osd
else
export CEPH_OSD_BASENAME = crimson-osd

View File

@ -49,7 +49,7 @@ mkdir ${BUILD_DIR}
-D WITH_SYSTEM_NPM=ON \
-D WITH_LTTNG=OFF \
-D WITH_BABELTRACE=OFF \
-D WITH_SEASTAR=OFF \
-D WITH_CRIMSON=OFF \
-D WITH_FUSE=ON \
-D WITH_KRBD=OFF \
-D WITH_XFS=OFF \

View File

@ -15,8 +15,8 @@ Building Crimson
Crimson is not enabled by default. Enable it at build time by running::
$ WITH_SEASTAR=true ./install-deps.sh
$ ./do_cmake.sh -DWITH_SEASTAR=ON
$ WITH_CRIMSON=true ./install-deps.sh
$ ./do_cmake.sh -DWITH_CRIMSON=ON
Please note, `ASan`_ is enabled by default if Crimson is built from a source
cloned using ``git``.

View File

@ -4,7 +4,7 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(sysctl_pid_max "kernel.pid_max = 4194304")
endif()
if(WITH_SEASTAR)
if(WITH_CRIMSON)
configure_file(90-crimson-osd.conf.in
${CMAKE_CURRENT_SOURCE_DIR}/90-ceph-osd.conf
@ONLY)

View File

@ -372,7 +372,7 @@ if [ x$(uname)x = xFreeBSDx ]; then
sysutils/fusefs-libs \
exit
else
[ $WITH_SEASTAR ] && with_seastar=true || with_seastar=false
[ $WITH_CRIMSON ] && with_seastar=true || with_seastar=false
[ $WITH_PMEM ] && with_pmem=true || with_pmem=false
source /etc/os-release
case "$ID" in

View File

@ -391,7 +391,7 @@ set_target_properties(Boost::MPL PROPERTIES
INTERFACE_COMPILE_DEFINITIONS
"BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS;BOOST_MPL_LIMIT_LIST_SIZE=30")
if(WITH_SEASTAR)
if(WITH_CRIMSON)
find_package(c-ares 1.13.0 QUIET)
if(NOT c-ares_FOUND)
message(STATUS "Could not find c-ares, will build it")

View File

@ -31,7 +31,7 @@ AuthSessionHandler *get_auth_session_handler(
{
// Should add code to only print the SHA1 hash of the key, unless in secure debugging mode
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
ldout(cct,10) << "In get_auth_session_handler for protocol " << protocol << dendl;
#endif
switch (protocol) {

View File

@ -526,7 +526,7 @@ bool cephx_verify_authorizer(CephContext *cct, const KeyStore& keys,
// generate a connection secret
connection_secret->resize(connection_secret_required_len);
if (connection_secret_required_len) {
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
std::random_device rd;
std::generate_n(connection_secret->data(),
connection_secret_required_len,

View File

@ -25,7 +25,7 @@
#define dout_subsys ceph_subsys_auth
namespace {
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
crimson::common::ConfigProxy& conf(CephContext*) {
return crimson::common::local_conf();
}

View File

@ -5,7 +5,7 @@
#include "common/perf_counters.h"
#include "include/types.h" // for operator<<(std::vector)
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/common/perf_counters_collection.h"
#else
#include "common/perf_counters_collection.h"

View File

@ -16,7 +16,7 @@
#include "common/dout.h"
#include "perfglue/heap_profiler.h"
#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN)
#ifdef WITH_CRIMSON
#include "crimson/common/perf_counters_collection.h"
#else
#include "common/perf_counters_collection.h"

View File

@ -89,7 +89,7 @@ template<typename... Args>
virtual ~RefCountedObjectSafe() override {}
};
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
/**
* RefCountedCond
@ -186,7 +186,7 @@ static inline void intrusive_ptr_add_ref(RefCountedWaitObject *p) {
static inline void intrusive_ptr_release(RefCountedWaitObject *p) {
p->put();
}
#endif // ifndef WITH_SEASTAR
#endif // ifndef WITH_CRIMSON
static inline void intrusive_ptr_add_ref(const RefCountedObject *p) {
p->get();

View File

@ -18,7 +18,7 @@
#include <sys/syscall.h> /* For SYS_xxx definitions */
#endif
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/os/alienstore/alien_store.h"
#endif

View File

@ -15,7 +15,7 @@
#include "include/Context.h"
#include "common/ThrottleInterface.h"
#include "common/Timer.h"
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/common/perf_counters_collection.h"
#else
#include "common/perf_counters_collection.h"

View File

@ -28,7 +28,7 @@
#include "include/spinlock.h"
#include "msg/Message.h"
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/common/perf_counters_collection.h"
#else
#include "common/perf_counters_collection.h"

View File

@ -15,7 +15,7 @@
#ifndef CEPH_WORKQUEUE_H
#define CEPH_WORKQUEUE_H
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
// for ObjectStore.h
struct ThreadPool {
struct TPHandle {

View File

@ -35,7 +35,7 @@
#include "common/version.h"
#include "common/ceph_mutex.h"
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
#include "common/Cond.h"
#endif
@ -442,7 +442,7 @@ void AdminSocket::do_tell_queue()
auto reply = new MCommandReply(r, err);
reply->set_tid(m->get_tid());
reply->set_data(outbl);
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
// TODO: crimson: handle asok commmand from alien thread
#else
m->get_connection()->send_message(reply);
@ -458,7 +458,7 @@ void AdminSocket::do_tell_queue()
auto reply = new MMonCommandAck(m->cmd, r, err, 0);
reply->set_tid(m->get_tid());
reply->set_data(outbl);
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
// TODO: crimson: handle asok commmand from alien thread
#else
m->get_connection()->send_message(reply);
@ -473,7 +473,7 @@ int AdminSocket::execute_command(
std::ostream& errss,
bufferlist *outbl)
{
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
// TODO: crimson: blocking execute_command() in alien thread
return -ENOSYS;
#else

View File

@ -15,7 +15,7 @@
#ifndef CEPH_COMMON_ADMIN_SOCKET_H
#define CEPH_COMMON_ADMIN_SOCKET_H
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/admin/admin_socket.h"
#else

View File

@ -17,7 +17,7 @@
// like a full memory barrier stalling execution till CPU's store and
// load buffers are drained.
#if defined(WITH_SEASTAR) && !defined(WITH_BLUESTORE)
#if defined(WITH_CRIMSON) && !defined(WITH_BLUESTORE)
#include <type_traits>
@ -84,10 +84,10 @@ namespace ceph {
template <class T> using atomic = dummy_atomic<T>;
} // namespace ceph
#else // WITH_SEASTAR
#else // WITH_CRIMSON
namespace ceph {
template <class T> using atomic = ::std::atomic<T>;
} // namespace ceph
#endif // WITH_SEASTAR
#endif // WITH_CRIMSON

View File

@ -48,7 +48,7 @@
#include "common/PluginRegistry.h"
#include "common/valgrind.h"
#include "include/spinlock.h"
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
#include "mon/MonMap.h"
#endif
@ -64,7 +64,7 @@ using ceph::bufferlist;
using ceph::HeartbeatMap;
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
namespace crimson::common {
CephContext::CephContext()
: _conf{crimson::common::local_conf()},
@ -105,7 +105,7 @@ PerfCountersCollectionImpl* CephContext::get_perfcounters_collection()
}
}
#else // WITH_SEASTAR
#else // WITH_CRIMSON
namespace {
#ifdef CEPH_DEBUG_MUTEX
@ -1063,4 +1063,4 @@ void CephContext::set_mon_addrs(const MonMap& mm) {
set_mon_addrs(mon_addrs);
}
}
#endif // WITH_SEASTAR
#endif // WITH_CRIMSON

View File

@ -34,7 +34,7 @@
#include "common/cmdparse.h"
#include "common/code_environment.h"
#include "msg/msg_types.h"
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/common/config_proxy.h"
#include "crimson/common/perf_counters_collection.h"
#else
@ -67,7 +67,7 @@ namespace ceph {
}
}
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
namespace crimson::common {
class CephContext {
public:
@ -424,9 +424,9 @@ private:
#ifdef __cplusplus
}
#endif
#endif // WITH_SEASTAR
#endif // WITH_CRIMSON
#if !defined(WITH_SEASTAR) && defined(__cplusplus)
#if !defined(WITH_CRIMSON) && defined(__cplusplus)
namespace ceph::common {
inline void intrusive_ptr_add_ref(CephContext* cct)
{
@ -438,5 +438,5 @@ inline void intrusive_ptr_release(CephContext* cct)
cct->put();
}
}
#endif // !defined(WITH_SEASTAR) && defined(__cplusplus)
#endif // !defined(WITH_CRIMSON) && defined(__cplusplus)
#endif

View File

@ -14,7 +14,7 @@
// and make_recursive_mutex() factory methods, which take a string
// naming the mutex for the purposes of the lockdep debug variant.
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include <seastar/core/condition-variable.hh>
#include "crimson/common/log.h"
@ -87,7 +87,7 @@ namespace ceph {
#define ceph_mutex_is_locked_by_me(m) true
}
#else // ifdef WITH_SEASTAR
#else // ifdef WITH_CRIMSON
//
// For legacy Mutex users that passed recursive=true, use
// ceph::make_recursive_mutex. For legacy Mutex users that passed
@ -197,7 +197,7 @@ namespace ceph {
#endif // CEPH_DEBUG_MUTEX
#endif // WITH_SEASTAR
#endif // WITH_CRIMSON
namespace ceph {

View File

@ -27,7 +27,7 @@
#define dout_subsys ceph_subsys_
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
CephContext *common_preinit(const CephInitParameters &iparams,
enum code_environment_t code_env, int flags)
{
@ -73,7 +73,7 @@ CephContext *common_preinit(const CephInitParameters &iparams,
}
return cct;
}
#endif // #ifndef WITH_SEASTAR
#endif // #ifndef WITH_CRIMSON
void complain_about_parse_error(CephContext *cct,
const std::string& parse_error)
@ -84,7 +84,7 @@ void complain_about_parse_error(CephContext *cct,
lderr(cct) << parse_error << dendl;
}
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
/* Please be sure that this can safely be called multiple times by the
* same application. */
@ -131,4 +131,4 @@ void common_init_finish(CephContext *cct)
}
}
#endif // #ifndef WITH_SEASTAR
#endif // #ifndef WITH_CRIMSON

View File

@ -43,7 +43,7 @@ enum common_init_flags_t {
CINIT_FLAG_NO_CCT_PERF_COUNTERS = 0x40,
};
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
class CephInitParameters;
/*
@ -65,7 +65,7 @@ class CephInitParameters;
*/
CephContext *common_preinit(const CephInitParameters &iparams,
enum code_environment_t code_env, int flags);
#endif // #ifndef WITH_SEASTAR
#endif // #ifndef WITH_CRIMSON
/* Print out some parse error. */
void complain_about_parse_error(CephContext *cct,

View File

@ -84,7 +84,7 @@ public:
return values;
}
void set_config_values(const ConfigValues& val) {
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
std::lock_guard l{lock};
#endif
values = val;

View File

@ -2,7 +2,7 @@
#include "config_values.h"
#include "config.h"
#if WITH_SEASTAR
#if WITH_CRIMSON
#include "crimson/common/log.h"
#endif
@ -78,7 +78,7 @@ void ConfigValues::set_logging(int which, const char* val)
}
subsys.set_log_level(which, log);
subsys.set_gather_level(which, gather);
#if WITH_SEASTAR
#if WITH_CRIMSON
crimson::get_logger(which).set_level(crimson::to_log_level(log));
#endif
}

View File

@ -20,7 +20,7 @@
#include "include/ceph_assert.h"
#include "include/common_fwd.h"
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include <seastar/util/log.hh>
#include "crimson/common/log.h"
#include "crimson/common/config_proxy.h"
@ -139,7 +139,7 @@ struct is_dynamic<dynamic_marker_t<T>> : public std::true_type {};
// generic macros
#define dout_prefix *_dout
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#define dout_impl(cct, sub, v) \
do { \
if (crimson::common::local_conf()->subsys.should_gather(sub, v)) { \
@ -190,7 +190,7 @@ struct is_dynamic<dynamic_marker_t<T>> : public std::true_type {};
_dout_cct->_log->submit_entry(std::move(_dout_e)); \
} \
} while (0)
#endif // WITH_SEASTAR
#endif // WITH_CRIMSON
#define lsubdout(cct, sub, v) dout_impl(cct, ceph_subsys_##sub, v) dout_prefix
#define ldout(cct, v) dout_impl(cct, dout_subsys, v) dout_prefix

View File

@ -5174,7 +5174,7 @@ options:
Only applied when OSD is doing ``--mkfs``.
default: true
verbatim: |
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
// This is necessary as the Seastar's allocator imposes restrictions
// on the number of threads that entered malloc/free/*. Unfortunately,
// RocksDB sharding in BlueStore dramatically lifted the number of

View File

@ -164,7 +164,7 @@ PerfCounters::~PerfCounters()
void PerfCounters::inc(int idx, uint64_t amt)
{
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
if (!m_cct->_conf->perf)
return;
#endif
@ -185,7 +185,7 @@ void PerfCounters::inc(int idx, uint64_t amt)
void PerfCounters::dec(int idx, uint64_t amt)
{
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
if (!m_cct->_conf->perf)
return;
#endif
@ -201,7 +201,7 @@ void PerfCounters::dec(int idx, uint64_t amt)
void PerfCounters::set(int idx, uint64_t amt)
{
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
if (!m_cct->_conf->perf)
return;
#endif
@ -225,7 +225,7 @@ void PerfCounters::set(int idx, uint64_t amt)
uint64_t PerfCounters::get(int idx) const
{
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
if (!m_cct->_conf->perf)
return 0;
#endif
@ -240,7 +240,7 @@ uint64_t PerfCounters::get(int idx) const
void PerfCounters::tinc(int idx, utime_t amt)
{
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
if (!m_cct->_conf->perf)
return;
#endif
@ -261,7 +261,7 @@ void PerfCounters::tinc(int idx, utime_t amt)
void PerfCounters::tinc(int idx, ceph::timespan amt)
{
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
if (!m_cct->_conf->perf)
return;
#endif
@ -282,7 +282,7 @@ void PerfCounters::tinc(int idx, ceph::timespan amt)
void PerfCounters::tset(int idx, utime_t amt)
{
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
if (!m_cct->_conf->perf)
return;
#endif
@ -299,7 +299,7 @@ void PerfCounters::tset(int idx, utime_t amt)
void PerfCounters::tset(int idx, ceph::timespan amt)
{
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
if (!m_cct->_conf->perf)
return;
#endif
@ -316,7 +316,7 @@ void PerfCounters::tset(int idx, ceph::timespan amt)
utime_t PerfCounters::tget(int idx) const
{
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
if (!m_cct->_conf->perf)
return utime_t();
#endif
@ -332,7 +332,7 @@ utime_t PerfCounters::tget(int idx) const
void PerfCounters::hinc(int idx, int64_t x, int64_t y)
{
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
if (!m_cct->_conf->perf)
return;
#endif
@ -349,7 +349,7 @@ void PerfCounters::hinc(int idx, int64_t x, int64_t y)
pair<uint64_t, uint64_t> PerfCounters::get_tavg_ns(int idx) const
{
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
if (!m_cct->_conf->perf)
return make_pair(0, 0);
#endif
@ -533,7 +533,7 @@ PerfCounters::PerfCounters(CephContext *cct, const std::string &name,
m_lower_bound(lower_bound),
m_upper_bound(upper_bound),
m_name(name)
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
,
m_lock_name(std::string("PerfCounters::") + name.c_str()),
m_lock(ceph::make_mutex(m_lock_name))

View File

@ -306,7 +306,7 @@ private:
int prio_adjust = 0;
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
const std::string m_lock_name;
/** Protects m_data */
ceph::mutex m_lock;

View File

@ -5,7 +5,7 @@
#include "common/intrusive_lru.h"
#include "include/utime.h"
#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN)
#ifdef WITH_CRIMSON
#include "crimson/common/perf_counters_collection.h"
#else
#include "common/perf_counters_collection.h"

View File

@ -34,7 +34,7 @@
#include "include/ipaddr.h"
#include "include/str_list.h"
#include "common/ceph_context.h"
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
#include "common/config.h"
#include "common/config_obs.h"
#endif
@ -137,7 +137,7 @@ bool matches_with_net(CephContext *cct,
int grade_with_numa_node(const ifaddrs& ifa, int numa_node)
{
#if defined(WITH_SEASTAR) || defined(_WIN32)
#if defined(WITH_CRIMSON) || defined(_WIN32)
return 0;
#else
if (numa_node < 0) {
@ -198,7 +198,7 @@ const struct sockaddr *find_ip_in_subnet_list(
return best_addr;
}
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
// observe this change
struct Observer : public md_config_obs_t {
const std::string key;
@ -298,7 +298,7 @@ void pick_addresses(CephContext *cct, int needs)
}
}
}
#endif // !WITH_SEASTAR
#endif // !WITH_CRIMSON
static std::optional<entity_addr_t> get_one_address(
CephContext *cct,

View File

@ -22,7 +22,7 @@ class entity_addrvec_t;
#define CEPH_PICK_ADDRESS_DEFAULT_MON_PORTS 0x80
#define CEPH_PICK_ADDRESS_PUBLIC_BIND 0x100
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
/*
Pick addresses based on subnets if needed.
@ -44,7 +44,7 @@ class entity_addrvec_t;
*/
void pick_addresses(CephContext *cct, int needs);
#endif // !WITH_SEASTAR
#endif // !WITH_CRIMSON
int pick_addresses(CephContext *cct, unsigned flags, entity_addrvec_t *addrs,
int preferred_numa_node = -1);

View File

@ -17,7 +17,7 @@
#include <map>
#include <list>
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include <boost/smart_ptr/local_shared_ptr.hpp>
#else
#include <memory>
@ -31,7 +31,7 @@
template <class K, class V>
class SharedLRU {
CephContext *cct;
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
using VPtr = boost::local_shared_ptr<V>;
using WeakVPtr = boost::weak_ptr<V>;
#else

View File

@ -50,7 +50,7 @@ std::string const pretty_version_to_str(void)
<< " (" << STRINGIFY(CEPH_GIT_VER) << ") "
<< ceph_release_name(CEPH_RELEASE)
<< " (" << CEPH_RELEASE_TYPE << ")"
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
<< " (crimson)"
#endif
;

View File

@ -1,5 +1,5 @@
add_library(crimson::cflags INTERFACE IMPORTED)
set(crimson_cflag_definitions "WITH_SEASTAR=1")
set(crimson_cflag_definitions "WITH_CRIMSON=1")
set_target_properties(crimson::cflags PROPERTIES
INTERFACE_COMPILE_DEFINITIONS "${crimson_cflag_definitions}"

View File

@ -31,7 +31,7 @@
#include <map>
#include <deque>
#include <queue>
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
#include <atomic>
#include <mutex>
#include <condition_variable>
@ -760,7 +760,7 @@ namespace crimson {
ClientInfoFunc client_info_f;
static constexpr bool is_dynamic_cli_info_f = U1;
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
static constexpr int data_mtx = 0;
struct DataGuard { DataGuard(int) {} };
#else
@ -806,7 +806,7 @@ namespace crimson {
RejectThreshold reject_threshold = 0;
double anticipation_timeout;
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
bool finishing;
#else
std::atomic_bool finishing;
@ -1509,7 +1509,7 @@ namespace crimson {
}
}; // class PullPriorityQueue
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
// TODO: PushPriorityQueue is not ported to seastar yet
// PUSH version
template<typename C, typename R, bool IsDelayed=false, bool U1=false, unsigned B=2>
@ -1811,6 +1811,6 @@ namespace crimson {
}
}
}; // class PushPriorityQueue
#endif // !WITH_SEASTAR
#endif // !WITH_CRIMSON
} // namespace dmclock
} // namespace crimson

View File

@ -16,11 +16,11 @@
#include <string.h>
#include "common/ceph_context.h"
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/common/config_proxy.h"
#endif
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
namespace ceph::global {
int __attribute__((weak)) g_conf_set_val(const std::string& key, const std::string& s) {
return 0;
@ -38,14 +38,14 @@ int __attribute__((weak)) g_conf_rm_val(const std::string& key) {
namespace TOPNSPC::global {
CephContext *g_ceph_context = NULL;
ConfigProxy& g_conf() {
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
return crimson::common::local_conf();
#else
return g_ceph_context->_conf;
#endif
}
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
int g_conf_set_val(const std::string& key, const std::string& s)
{
if (g_ceph_context != NULL)

View File

@ -65,14 +65,14 @@
#define CEPH_BUFFER_API
#ifdef HAVE_SEASTAR
#ifdef WITH_CRIMSON
namespace seastar {
template <typename T> class temporary_buffer;
namespace net {
class packet;
}
}
#endif // HAVE_SEASTAR
#endif // WITH_CRIMSON
class deleter;
template<typename T> class DencDumper;
@ -149,7 +149,7 @@ struct error_code;
ceph::unique_leakable_ptr<raw> create_small_page_aligned(unsigned len);
ceph::unique_leakable_ptr<raw> claim_buffer(unsigned len, char *buf, deleter del);
#ifdef HAVE_SEASTAR
#ifdef WITH_CRIMSON
/// create a raw buffer to wrap seastar cpu-local memory, using foreign_ptr to
/// make it safe to share between cpus
ceph::unique_leakable_ptr<buffer::raw> create(seastar::temporary_buffer<char>&& buf);
@ -335,12 +335,12 @@ struct error_code;
void zero(unsigned o, unsigned l, bool crc_reset = true);
unsigned append_zeros(unsigned l);
#ifdef HAVE_SEASTAR
#ifdef WITH_CRIMSON
/// create a temporary_buffer, copying the ptr as its deleter
operator seastar::temporary_buffer<char>() &;
/// convert to temporary_buffer, stealing the ptr as its deleter
operator seastar::temporary_buffer<char>() &&;
#endif // HAVE_SEASTAR
#endif // WITH_CRIMSON
};
@ -1105,7 +1105,7 @@ struct error_code;
}
}
#ifdef HAVE_SEASTAR
#ifdef WITH_CRIMSON
/// convert the bufferlist into a network packet
operator seastar::net::packet() &&;
#endif

View File

@ -1,6 +1,6 @@
#pragma once
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#define TOPNSPC crimson
#else
#define TOPNSPC ceph

View File

@ -20,7 +20,7 @@
#include <time.h>
#include <errno.h>
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include <seastar/core/lowres_clock.hh>
#endif
@ -93,7 +93,7 @@ public:
tv.tv_nsec = std::max<common_t>((std::chrono::duration_cast<std::chrono::nanoseconds>(dur) %
std::chrono::seconds(1)).count(), 0);
}
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
explicit utime_t(const seastar::lowres_system_clock::time_point& t) {
tv.tv_sec = std::chrono::duration_cast<std::chrono::seconds>(
t.time_since_epoch()).count();

View File

@ -35,7 +35,7 @@
#include "common/debug.h"
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/common/perf_counters_collection.h"
#else
#include "common/perf_counters_collection.h"

View File

@ -52,7 +52,7 @@ SQLITE_EXTENSION_INIT1
#include "include/libcephsqlite.h"
#include "SimpleRADOSStriper.h"
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/common/perf_counters_collection.h"
#else
#include "common/perf_counters_collection.h"

View File

@ -20,7 +20,7 @@
#include "common/debug.h"
#include "common/StackStringStream.h"
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/common/config_proxy.h"
#else
#include "common/config_proxy.h"

View File

@ -26,7 +26,7 @@
#include "CInode.h"
#include "Mutation.h"
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/common/perf_counters_collection.h"
#else
#include "common/perf_counters_collection.h"

View File

@ -48,7 +48,7 @@ public:
tid(t), client_caps(caps), msg(NULL) {
client_type = m->get_source().type();
client_addrs = m->get_source_addrs();
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
ceph_abort("In crimson, conn is independently maintained outside Message");
#else
if (auto &con = m->get_connection()) {

View File

@ -166,7 +166,7 @@ public:
uint64_t get_features() const {
if (features)
return features;
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
ceph_abort("In crimson, conn is independently maintained outside Message");
#else
return get_connection()->get_features();

View File

@ -33,7 +33,7 @@ public:
spgid,
pg_shard_t(get_source().num(), notify.from),
notify,
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
features
#else
get_connection()->get_features()

View File

@ -26,7 +26,7 @@ public:
virtual PGPeeringEvent *get_event() = 0;
virtual void inner_print(std::ostream& out) const = 0;
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
// In crimson, conn is independently maintained outside Message.
// Instead of get features from the connection later, set features at
// the start of the operation.

View File

@ -9,7 +9,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include <seastar/core/fstream.hh>
#include <seastar/core/reactor.hh>
#include <seastar/net/dns.hh>
@ -39,7 +39,7 @@ using std::vector;
using ceph::DNSResolver;
using ceph::Formatter;
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
namespace {
seastar::logger& logger()
{
@ -767,7 +767,7 @@ void MonMap::check_health(health_check_map_t *checks) const
}
}
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
seastar::future<> MonMap::read_monmap(const std::string& monmap)
{
@ -904,7 +904,7 @@ seastar::future<> MonMap::build_initial(const crimson::common::ConfigProxy& conf
}
}
#else // WITH_SEASTAR
#else // WITH_CRIMSON
int MonMap::init_with_monmap(const std::string& monmap, std::ostream& errout)
{
@ -1030,4 +1030,4 @@ int MonMap::build_initial(CephContext *cct, bool for_mkfs, ostream& errout)
calc_legacy_ranks();
return 0;
}
#endif // WITH_SEASTAR
#endif // WITH_CRIMSON

View File

@ -15,7 +15,7 @@
#ifndef CEPH_MONMAP_H
#define CEPH_MONMAP_H
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include <seastar/core/future.hh>
#endif
@ -33,7 +33,7 @@
class health_check_map_t;
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
namespace crimson::common {
class ConfigProxy;
}
@ -459,7 +459,7 @@ public:
* @param cct context (and associated config)
* @param errout std::ostream to send error messages too
*/
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
seastar::future<> build_initial(const crimson::common::ConfigProxy& conf, bool for_mkfs);
#else
int build_initial(CephContext *cct, bool for_mkfs, std::ostream& errout);
@ -528,7 +528,7 @@ protected:
bool for_mkfs,
std::string_view prefix);
int init_with_config_file(const ConfigProxy& conf, std::ostream& errout);
#if WITH_SEASTAR
#if WITH_CRIMSON
seastar::future<> read_monmap(const std::string& monmap);
/// try to build monmap with different settings, like
/// mon_host, mon* sections, and mon_dns_srv_name

View File

@ -96,7 +96,7 @@
#include "auth/none/AuthNoneClientHandler.h"
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/common/perf_counters_collection.h"
#else
#include "common/perf_counters_collection.h"

View File

@ -23,7 +23,7 @@
#include "common/Timer.h"
#include "messages/PaxosServiceMessage.h"
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/common/perf_counters_collection.h"
#else
#include "common/perf_counters_collection.h"

View File

@ -323,7 +323,7 @@ Message *decode_message(CephContext *cct,
ceph::bufferlist& data,
Message::ConnectionRef conn)
{
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
// In crimson, conn is independently maintained outside Message.
ceph_assert(conn == nullptr);
#endif
@ -335,7 +335,7 @@ Message *decode_message(CephContext *cct,
if (front_crc != footer.front_crc) {
if (cct) {
ldout(cct, 0) << "bad crc in front " << front_crc << " != exp " << footer.front_crc
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
<< " from " << conn->get_peer_addr()
#endif
<< dendl;
@ -348,7 +348,7 @@ Message *decode_message(CephContext *cct,
if (middle_crc != footer.middle_crc) {
if (cct) {
ldout(cct, 0) << "bad crc in middle " << middle_crc << " != exp " << footer.middle_crc
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
<< " from " << conn->get_peer_addr()
#endif
<< dendl;
@ -365,7 +365,7 @@ Message *decode_message(CephContext *cct,
if (data_crc != footer.data_crc) {
if (cct) {
ldout(cct, 0) << "bad crc in data " << data_crc << " != exp " << footer.data_crc
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
<< " from " << conn->get_peer_addr()
#endif
<< dendl;

View File

@ -258,7 +258,7 @@
class Message : public RefCountedObject {
public:
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
// In crimson, conn is independently maintained outside Message.
using ConnectionRef = void*;
#else
@ -359,13 +359,13 @@ protected:
}
public:
const ConnectionRef& get_connection() const {
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
ceph_abort("In crimson, conn is independently maintained outside Message");
#endif
return connection;
}
void set_connection(ConnectionRef c) {
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
// In crimson, conn is independently maintained outside Message.
ceph_assert(c == nullptr);
#endif
@ -505,7 +505,7 @@ public:
return entity_name_t(header.src);
}
entity_addr_t get_source_addr() const {
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
ceph_abort("In crimson, conn is independently maintained outside Message");
#else
if (connection)
@ -514,7 +514,7 @@ public:
return entity_addr_t();
}
entity_addrvec_t get_source_addrs() const {
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
ceph_abort("In crimson, conn is independently maintained outside Message");
#else
if (connection)
@ -577,7 +577,7 @@ class SafeMessage : public Message {
public:
using Message::Message;
bool is_a_client() const {
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
ceph_abort("In crimson, conn is independently maintained outside Message");
#else
return get_connection()->get_peer_type() == CEPH_ENTITY_TYPE_CLIENT;

View File

@ -23,7 +23,7 @@
#include "msg/async/Event.h"
#include "msg/msg_types.h"
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/common/perf_counters_collection.h"
#else
#include "common/perf_counters_collection.h"

View File

@ -79,7 +79,7 @@ public:
* @param journal path (or other descriptor) for journal (optional)
* @param flags which filestores should check if applicable
*/
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
static std::unique_ptr<ObjectStore> create(
CephContext *cct,
const std::string& type,

View File

@ -13,7 +13,7 @@
#include "include/ceph_assert.h"
#include "common/admin_socket.h"
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/common/perf_counters_collection.h"
#else
#include "common/perf_counters_collection.h"

View File

@ -336,7 +336,7 @@ int ClassHandler::ClassMethod::exec(cls_method_context_t ctx, bufferlist& indata
ClassHandler& ClassHandler::get_instance()
{
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
// the context is being used solely for:
// 1. random number generation (cls_gen_random_bytes)
// 2. accessing the configuration
@ -345,6 +345,6 @@ ClassHandler& ClassHandler::get_instance()
static ClassHandler single(&cct);
#else
static ClassHandler single(g_ceph_context);
#endif // WITH_SEASTAR
#endif // WITH_CRIMSON
return single;
}

View File

@ -121,7 +121,7 @@ public:
match_string = stringify(m->get_reqid().name);
break;
case OSDPerfMetricSubKeyType::CLIENT_ADDRESS:
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
match_string = stringify(op.get_connection()->get_peer_addr());
#else
match_string = stringify(m->get_connection()->get_peer_addr());

View File

@ -109,7 +109,7 @@ ostream &operator<<(ostream &lhs, const ECCommon::read_result_t &rhs)
ostream &operator<<(ostream &lhs, const ECCommon::ReadOp &rhs)
{
lhs << "ReadOp(tid=" << rhs.tid;
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
if (rhs.op && rhs.op->get_req()) {
lhs << ", op=";
rhs.op->get_req()->print(lhs);
@ -127,7 +127,7 @@ ostream &operator<<(ostream &lhs, const ECCommon::ReadOp &rhs)
void ECCommon::ReadOp::dump(Formatter *f) const
{
f->dump_unsigned("tid", tid);
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
if (op && op->get_req()) {
f->dump_stream("op") << *(op->get_req());
}
@ -148,7 +148,7 @@ ostream &operator<<(ostream &lhs, const ECCommon::RMWPipeline::Op &rhs)
<< " tt=" << rhs.trim_to
<< " tid=" << rhs.tid
<< " reqid=" << rhs.reqid;
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
if (rhs.client_op && rhs.client_op->get_req()) {
lhs << " client_op=";
rhs.client_op->get_req()->print(lhs);
@ -416,7 +416,7 @@ void ECCommon::ReadPipeline::start_read_op(
std::move(to_read))).first->second;
dout(10) << __func__ << ": starting " << op << dendl;
if (_op) {
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
op.trace = _op->pg_trace;
#endif
op.trace.event("start ec read");

View File

@ -21,7 +21,7 @@
#include "erasure-code/ErasureCodeInterface.h"
#include "ECUtil.h"
#include "ECTypes.h"
#if WITH_SEASTAR
#if WITH_CRIMSON
#include "ExtentCache.h"
#include "crimson/osd/object_context.h"
#include "os/Transaction.h"

View File

@ -108,7 +108,7 @@ ostream &operator<<(ostream &lhs, const ECCommonL::read_result_t &rhs)
ostream &operator<<(ostream &lhs, const ECCommonL::ReadOp &rhs)
{
lhs << "ReadOp(tid=" << rhs.tid;
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
if (rhs.op && rhs.op->get_req()) {
lhs << ", op=";
rhs.op->get_req()->print(lhs);
@ -126,7 +126,7 @@ ostream &operator<<(ostream &lhs, const ECCommonL::ReadOp &rhs)
void ECCommonL::ReadOp::dump(Formatter *f) const
{
f->dump_unsigned("tid", tid);
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
if (op && op->get_req()) {
f->dump_stream("op") << *(op->get_req());
}
@ -147,7 +147,7 @@ ostream &operator<<(ostream &lhs, const ECCommonL::RMWPipeline::Op &rhs)
<< " tt=" << rhs.trim_to
<< " tid=" << rhs.tid
<< " reqid=" << rhs.reqid;
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
if (rhs.client_op && rhs.client_op->get_req()) {
lhs << " client_op=";
rhs.client_op->get_req()->print(lhs);
@ -415,7 +415,7 @@ void ECCommonL::ReadPipeline::start_read_op(
std::move(to_read))).first->second;
dout(10) << __func__ << ": starting " << op << dendl;
if (_op) {
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
op.trace = _op->pg_trace;
#endif
op.trace.event("start ec read");

View File

@ -22,7 +22,7 @@
#include "erasure-code/ErasureCodeInterface.h"
#include "ECUtilL.h"
#include "ECTypes.h"
#if WITH_SEASTAR
#if WITH_CRIMSON
#include "ECExtentCacheL.h"
#include "crimson/osd/object_context.h"
#include "os/Transaction.h"

View File

@ -35,7 +35,7 @@ struct ECListener {
virtual void cancel_pull(
const hobject_t &soid) = 0;
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
// XXX
virtual pg_shard_t primary_shard() const = 0;
virtual bool pgb_is_primary() const = 0;
@ -105,7 +105,7 @@ struct ECListener {
#endif
// XXX
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
virtual GenContext<ThreadPool::TPHandle&> *bless_unlocked_gencontext(
GenContext<ThreadPool::TPHandle&> *c) = 0;

View File

@ -40,7 +40,7 @@
#include "crush/CrushWrapper.h"
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include <boost/smart_ptr/local_shared_ptr.hpp>
#endif
@ -1842,7 +1842,7 @@ public:
WRITE_CLASS_ENCODER_FEATURES(OSDMap)
WRITE_CLASS_ENCODER_FEATURES(OSDMap::Incremental)
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/common/local_shared_foreign_ptr.h"
using LocalOSDMapRef = boost::local_shared_ptr<const OSDMap>;
using OSDMapRef = crimson::local_shared_foreign_ptr<LocalOSDMapRef>;

View File

@ -55,7 +55,7 @@ public:
void _dump(ceph::Formatter *f) const override;
bool has_feature(uint64_t f) const {
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
ceph_abort("In crimson, conn is independently maintained outside Message");
#else
return request->get_connection()->has_feature(f);

View File

@ -1070,7 +1070,7 @@ void PGLog::rebuild_missing_set_with_deletes(
set_missing_may_contain_deletes();
}
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
namespace {
struct FuturizedShardStoreLogReader {

View File

@ -33,7 +33,7 @@
#include <unordered_map>
#include <vector>
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include <seastar/core/future.hh>
#include "crimson/os/futurized_store.h"
#include "crimson/os/cyanstore/cyan_collection.h"
@ -1684,7 +1684,7 @@ public:
<< " log.dups.size()=" << log.dups.size() << dendl;
} // static read_log_and_missing
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
seastar::future<> read_log_and_missing_crimson(
crimson::os::FuturizedStore::Shard &store,
crimson::os::CollectionRef ch,

View File

@ -19,7 +19,7 @@
#include <optional>
#include "common/hobject.h"
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
#include "osd/osd_internal_types.h"
#else
#include "crimson/osd/object_context.h"

View File

@ -2779,7 +2779,7 @@ void PeeringState::activate(
psdout(10) << "activate peer osd." << peer << " " << pi << dendl;
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
MURef<MOSDPGLog> m;
#else
MRef<MOSDPGLog> m;

View File

@ -85,7 +85,7 @@ struct PeeringCtx;
// [primary only] content recovery state
struct BufferedRecoveryMessages {
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
std::map<int, std::vector<MessageURef>> message_map;
#else
std::map<int, std::vector<MessageRef>> message_map;
@ -293,7 +293,7 @@ public:
virtual uint64_t get_snap_trimq_size() const = 0;
/// Send cluster message to osd
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
virtual void send_cluster_message(
int osd, MessageURef m, epoch_t epoch, bool share_map_update=false) = 0;
#else

View File

@ -81,7 +81,7 @@ const char *SnapMapper::PURGED_SNAP_PREFIX = "PSN_";
*/
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/common/log.h"
#include "crimson/osd/pg_interval_interrupt_condition.h"
template <typename ValuesT = void>
@ -205,7 +205,7 @@ int OSDriver::get_next_or_current(
return -ENOENT;
}
}
#endif // WITH_SEASTAR
#endif // WITH_CRIMSON
SnapMapper::SnapMapper(
CephContext* cct,
@ -921,7 +921,7 @@ void SnapMapper::record_purged_snaps(
}
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
bool SnapMapper::Scrubber::_parse_p()
{
if (!psit->valid()) {
@ -1025,7 +1025,7 @@ void SnapMapper::Scrubber::run()
psit = ObjectMap::ObjectMapIterator();
mapit = ObjectMap::ObjectMapIterator();
}
#endif // !WITH_SEASTAR
#endif // !WITH_CRIMSON
// -------------------------------------
@ -1051,7 +1051,7 @@ bool SnapMapper::is_legacy_mapping(const string &to_test)
LEGACY_MAPPING_PREFIX;
}
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
/* Octopus modified the SnapMapper key format from
*
* <LEGACY_MAPPING_PREFIX><snapid>_<shardid>_<hobject_t::to_str()>
@ -1142,4 +1142,4 @@ int SnapMapper::convert_legacy(
}
return 0;
}
#endif // !WITH_SEASTAR
#endif // !WITH_CRIMSON

View File

@ -23,7 +23,7 @@
#include "common/hobject.h"
#include "common/map_cacher.hpp"
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
# include "crimson/os/futurized_store.h"
# include "crimson/os/futurized_collection.h"
#endif
@ -35,7 +35,7 @@
#include "osd/SnapMapReaderI.h"
class OSDriver : public MapCacher::StoreDriver<std::string, ceph::buffer::list> {
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
using ObjectStoreT = crimson::os::FuturizedStore::Shard;
using CollectionHandleT = ObjectStoreT::CollectionRef;
#else
@ -78,7 +78,7 @@ public:
return OSTransaction(ch->get_cid(), hoid, t);
}
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
OSDriver(ObjectStoreT *os, const coll_t& cid, const ghobject_t &hoid) :
OSDriver(os, os->open_collection(cid), hoid) {}
#endif
@ -175,7 +175,7 @@ public:
static const char *PURGED_SNAP_EPOCH_PREFIX;
static const char *PURGED_SNAP_PREFIX;
#ifndef WITH_SEASTAR
#ifndef WITH_CRIMSON
struct Scrubber {
CephContext *cct;
ObjectStore *store;

View File

@ -29,7 +29,7 @@
#include <string_view>
#include <boost/variant.hpp>
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include <boost/smart_ptr/local_shared_ptr.hpp>
#endif
@ -3310,7 +3310,7 @@ WRITE_CLASS_ENCODER(pg_fast_info_t)
* the might_have_unfound set
*/
class PastIntervals {
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
using OSDMapRef = boost::local_shared_ptr<const OSDMap>;
#else
using OSDMapRef = std::shared_ptr<const OSDMap>;

View File

@ -19,7 +19,7 @@
#include "osd/scheduler/mClockScheduler.h"
#include "common/debug.h"
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/common/perf_counters_collection.h"
#else
#include "common/perf_counters_collection.h"

View File

@ -224,7 +224,7 @@ class ScrubQueue {
CephContext* cct;
Scrub::ScrubSchedListener& osd_service;
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
auto& conf() const { return local_conf(); }
#else
auto& conf() const { return cct->_conf; }

View File

@ -13,7 +13,7 @@
#include <unordered_map>
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/common/perf_counters_collection.h"
#else
#include "common/perf_counters_collection.h"

View File

@ -8,7 +8,7 @@
#include "common/config.h"
#include "rgw_dmclock.h"
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/common/perf_counters_collection.h"
#else
#include "common/perf_counters_collection.h"

View File

@ -5,7 +5,7 @@
#include "rgw_dmclock_sync_scheduler.h"
#include "rgw_dmclock_scheduler_ctx.h"
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/common/perf_counters_collection.h"
#else
#include "common/perf_counters_collection.h"

View File

@ -119,8 +119,8 @@ EOM
cmake_opts+=" -DWITH_GRAFANA=ON"
cmake_opts+=" -DWITH_SPDK=ON"
cmake_opts+=" -DWITH_RBD_MIRROR=ON"
if [ $WITH_SEASTAR ]; then
cmake_opts+=" -DWITH_SEASTAR=ON"
if [ $WITH_CRIMSON ]; then
cmake_opts+=" -DWITH_CRIMSON=ON"
fi
if [ $WITH_RBD_RWL ]; then
cmake_opts+=" -DWITH_RBD_RWL=ON"

View File

@ -90,7 +90,7 @@ endif(WITH_RADOSGW)
if(WITH_RBD AND NOT WIN32)
add_subdirectory(rbd_mirror)
endif(WITH_RBD AND NOT WIN32)
if(WITH_SEASTAR)
if(WITH_CRIMSON)
add_subdirectory(crimson)
endif()
add_subdirectory(system)

View File

@ -30,7 +30,7 @@
#include "include/ceph_assert.h" // fio.h clobbers our assert.h
#include <algorithm>
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
#include "crimson/common/perf_counters_collection.h"
#else
#include "common/perf_counters_collection.h"

View File

@ -21,7 +21,7 @@ class CctCleaner {
public:
CctCleaner(CephContext* _cct) : cct(_cct) {}
~CctCleaner() {
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
delete cct;
#else
cct->put();

View File

@ -22,7 +22,7 @@ class CctCleaner {
public:
CctCleaner(CephContext* _cct) : cct(_cct) {}
~CctCleaner() {
#ifdef WITH_SEASTAR
#ifdef WITH_CRIMSON
delete cct;
#else
cct->put();