From 23c33f69ff977f7a05d3e3368e078b20e67a5ced Mon Sep 17 00:00:00 2001 From: Matan Breizman Date: Thu, 3 Apr 2025 07:53:15 +0000 Subject: [PATCH] src: sed -i 's/WITH_SEASTAR/WITH_CRIMSON/' Signed-off-by: Matan Breizman --- CMakeLists.txt | 6 +++--- ceph.spec.in | 2 +- debian/rules | 2 +- do_freebsd.sh | 2 +- doc/dev/crimson/crimson.rst | 4 ++-- etc/sysctl/CMakeLists.txt | 2 +- install-deps.sh | 2 +- src/CMakeLists.txt | 2 +- src/auth/AuthSessionHandler.cc | 2 +- src/auth/cephx/CephxProtocol.cc | 2 +- src/auth/cephx/CephxSessionHandler.cc | 2 +- src/common/Finisher.cc | 2 +- src/common/PriorityCache.cc | 2 +- src/common/RefCountedObj.h | 4 ++-- src/common/Thread.cc | 2 +- src/common/Throttle.h | 2 +- src/common/TrackedOp.h | 2 +- src/common/WorkQueue.h | 2 +- src/common/admin_socket.cc | 8 ++++---- src/common/admin_socket.h | 2 +- src/common/ceph_atomic.h | 6 +++--- src/common/ceph_context.cc | 8 ++++---- src/common/ceph_context.h | 10 +++++----- src/common/ceph_mutex.h | 6 +++--- src/common/common_init.cc | 8 ++++---- src/common/common_init.h | 4 ++-- src/common/config_proxy.h | 2 +- src/common/config_values.cc | 4 ++-- src/common/dout.h | 6 +++--- src/common/options/global.yaml.in | 2 +- src/common/perf_counters.cc | 24 ++++++++++++------------ src/common/perf_counters.h | 2 +- src/common/perf_counters_cache.h | 2 +- src/common/pick_address.cc | 8 ++++---- src/common/pick_address.h | 4 ++-- src/common/shared_cache.hpp | 4 ++-- src/common/version.cc | 2 +- src/crimson/CMakeLists.txt | 2 +- src/dmclock/src/dmclock_server.h | 10 +++++----- src/global/global_context.cc | 8 ++++---- src/include/buffer.h | 12 ++++++------ src/include/common_fwd.h | 2 +- src/include/utime.h | 4 ++-- src/kv/RocksDBStore.cc | 2 +- src/libcephsqlite.cc | 2 +- src/mds/FSMap.cc | 2 +- src/mds/Server.h | 2 +- src/messages/MForward.h | 2 +- src/messages/MOSDOp.h | 2 +- src/messages/MOSDPGNotify2.h | 2 +- src/messages/MOSDPeeringOp.h | 2 +- src/mon/MonMap.cc | 10 +++++----- src/mon/MonMap.h | 8 ++++---- src/mon/Monitor.cc | 2 +- src/mon/Paxos.cc | 2 +- src/msg/Message.cc | 8 ++++---- src/msg/Message.h | 12 ++++++------ src/msg/async/Stack.h | 2 +- src/os/ObjectStore.h | 2 +- src/os/bluestore/BlueFS.cc | 2 +- src/osd/ClassHandler.cc | 4 ++-- src/osd/DynamicPerfStats.h | 2 +- src/osd/ECCommon.cc | 8 ++++---- src/osd/ECCommon.h | 2 +- src/osd/ECCommonL.cc | 8 ++++---- src/osd/ECCommonL.h | 2 +- src/osd/ECListener.h | 4 ++-- src/osd/OSDMap.h | 4 ++-- src/osd/OpRequest.h | 2 +- src/osd/PGLog.cc | 2 +- src/osd/PGLog.h | 4 ++-- src/osd/PGTransaction.h | 2 +- src/osd/PeeringState.cc | 2 +- src/osd/PeeringState.h | 4 ++-- src/osd/SnapMapper.cc | 12 ++++++------ src/osd/SnapMapper.h | 8 ++++---- src/osd/osd_types.h | 4 ++-- src/osd/scheduler/mClockScheduler.cc | 2 +- src/osd/scrubber/osd_scrub_sched.h | 2 +- src/osdc/ObjectCacher.cc | 2 +- src/rgw/rgw_dmclock_scheduler_ctx.h | 2 +- src/rgw/rgw_dmclock_sync_scheduler.cc | 2 +- src/script/run-make.sh | 4 ++-- src/test/CMakeLists.txt | 2 +- src/test/fio/fio_ceph_objectstore.cc | 2 +- src/test/rgw/test_rgw_amqp.cc | 2 +- src/test/rgw/test_rgw_lua.cc | 2 +- 87 files changed, 177 insertions(+), 177 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e30d65e31d..dc411ddfa7d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/ceph.spec.in b/ceph.spec.in index 12dbad48d6d..2a604e0f9de 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -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 \ diff --git a/debian/rules b/debian/rules index 6c0ab5e12c6..d3654160242 100755 --- a/debian/rules +++ b/debian/rules @@ -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 diff --git a/do_freebsd.sh b/do_freebsd.sh index 442fd633f46..c962458b437 100755 --- a/do_freebsd.sh +++ b/do_freebsd.sh @@ -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 \ diff --git a/doc/dev/crimson/crimson.rst b/doc/dev/crimson/crimson.rst index f6d59a057ff..21e6ab34433 100644 --- a/doc/dev/crimson/crimson.rst +++ b/doc/dev/crimson/crimson.rst @@ -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``. diff --git a/etc/sysctl/CMakeLists.txt b/etc/sysctl/CMakeLists.txt index a31344c6a9c..7acd810f02c 100644 --- a/etc/sysctl/CMakeLists.txt +++ b/etc/sysctl/CMakeLists.txt @@ -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) diff --git a/install-deps.sh b/install-deps.sh index 6df0b94e33a..54bacb6567a 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -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 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6f1f1d38c05..0a142bdb462 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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") diff --git a/src/auth/AuthSessionHandler.cc b/src/auth/AuthSessionHandler.cc index d7ad21831ed..f0a8374005e 100644 --- a/src/auth/AuthSessionHandler.cc +++ b/src/auth/AuthSessionHandler.cc @@ -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) { diff --git a/src/auth/cephx/CephxProtocol.cc b/src/auth/cephx/CephxProtocol.cc index 9d423b1463d..93504358d32 100644 --- a/src/auth/cephx/CephxProtocol.cc +++ b/src/auth/cephx/CephxProtocol.cc @@ -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, diff --git a/src/auth/cephx/CephxSessionHandler.cc b/src/auth/cephx/CephxSessionHandler.cc index 6b27125688a..1c0ad4e6353 100644 --- a/src/auth/cephx/CephxSessionHandler.cc +++ b/src/auth/cephx/CephxSessionHandler.cc @@ -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(); } diff --git a/src/common/Finisher.cc b/src/common/Finisher.cc index b8e7f3e6342..34eb8410937 100644 --- a/src/common/Finisher.cc +++ b/src/common/Finisher.cc @@ -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" diff --git a/src/common/PriorityCache.cc b/src/common/PriorityCache.cc index fa845991d7f..ca5165f1ae1 100644 --- a/src/common/PriorityCache.cc +++ b/src/common/PriorityCache.cc @@ -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" diff --git a/src/common/RefCountedObj.h b/src/common/RefCountedObj.h index 6dfdd4a592b..924d01eea80 100644 --- a/src/common/RefCountedObj.h +++ b/src/common/RefCountedObj.h @@ -89,7 +89,7 @@ template 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(); diff --git a/src/common/Thread.cc b/src/common/Thread.cc index c714aa0aa87..ec397d66340 100644 --- a/src/common/Thread.cc +++ b/src/common/Thread.cc @@ -18,7 +18,7 @@ #include /* For SYS_xxx definitions */ #endif -#ifdef WITH_SEASTAR +#ifdef WITH_CRIMSON #include "crimson/os/alienstore/alien_store.h" #endif diff --git a/src/common/Throttle.h b/src/common/Throttle.h index b46878994ed..dac441bbbf0 100644 --- a/src/common/Throttle.h +++ b/src/common/Throttle.h @@ -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" diff --git a/src/common/TrackedOp.h b/src/common/TrackedOp.h index 1cc76a4b5f9..c6e3ab50b8e 100644 --- a/src/common/TrackedOp.h +++ b/src/common/TrackedOp.h @@ -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" diff --git a/src/common/WorkQueue.h b/src/common/WorkQueue.h index f51c59b9f9e..64cede55ffa 100644 --- a/src/common/WorkQueue.h +++ b/src/common/WorkQueue.h @@ -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 { diff --git a/src/common/admin_socket.cc b/src/common/admin_socket.cc index b345d7cfb2c..957f92ad4d3 100644 --- a/src/common/admin_socket.cc +++ b/src/common/admin_socket.cc @@ -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 diff --git a/src/common/admin_socket.h b/src/common/admin_socket.h index 4183ad30fb3..55f3ab15a54 100644 --- a/src/common/admin_socket.h +++ b/src/common/admin_socket.h @@ -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 diff --git a/src/common/ceph_atomic.h b/src/common/ceph_atomic.h index 4a96ed97e9c..76a4db3c6fc 100644 --- a/src/common/ceph_atomic.h +++ b/src/common/ceph_atomic.h @@ -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 @@ -84,10 +84,10 @@ namespace ceph { template using atomic = dummy_atomic; } // namespace ceph -#else // WITH_SEASTAR +#else // WITH_CRIMSON namespace ceph { template using atomic = ::std::atomic; } // namespace ceph -#endif // WITH_SEASTAR +#endif // WITH_CRIMSON diff --git a/src/common/ceph_context.cc b/src/common/ceph_context.cc index cbcf8a90327..8e6cbcf39a1 100644 --- a/src/common/ceph_context.cc +++ b/src/common/ceph_context.cc @@ -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 diff --git a/src/common/ceph_context.h b/src/common/ceph_context.h index 5a2619a8f2b..cd8dd1404d5 100644 --- a/src/common/ceph_context.h +++ b/src/common/ceph_context.h @@ -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 diff --git a/src/common/ceph_mutex.h b/src/common/ceph_mutex.h index 7430472cc95..120b04f9e3b 100644 --- a/src/common/ceph_mutex.h +++ b/src/common/ceph_mutex.h @@ -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 #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 { diff --git a/src/common/common_init.cc b/src/common/common_init.cc index 5e61c507831..0c3d6a84ea1 100644 --- a/src/common/common_init.cc +++ b/src/common/common_init.cc @@ -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 diff --git a/src/common/common_init.h b/src/common/common_init.h index a6940c6eb89..c5a469bee7c 100644 --- a/src/common/common_init.h +++ b/src/common/common_init.h @@ -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, diff --git a/src/common/config_proxy.h b/src/common/config_proxy.h index 7710eec85ad..cdd705509f1 100644 --- a/src/common/config_proxy.h +++ b/src/common/config_proxy.h @@ -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; diff --git a/src/common/config_values.cc b/src/common/config_values.cc index f4a0a19595c..2cdecbf0d83 100644 --- a/src/common/config_values.cc +++ b/src/common/config_values.cc @@ -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 } diff --git a/src/common/dout.h b/src/common/dout.h index bec46d1f698..4fed3d9178d 100644 --- a/src/common/dout.h +++ b/src/common/dout.h @@ -20,7 +20,7 @@ #include "include/ceph_assert.h" #include "include/common_fwd.h" -#ifdef WITH_SEASTAR +#ifdef WITH_CRIMSON #include #include "crimson/common/log.h" #include "crimson/common/config_proxy.h" @@ -139,7 +139,7 @@ struct is_dynamic> : 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> : 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 diff --git a/src/common/options/global.yaml.in b/src/common/options/global.yaml.in index 99cd1b7adea..51200eb9dd0 100644 --- a/src/common/options/global.yaml.in +++ b/src/common/options/global.yaml.in @@ -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 diff --git a/src/common/perf_counters.cc b/src/common/perf_counters.cc index 9d26f579cf5..fe9b9b18765 100644 --- a/src/common/perf_counters.cc +++ b/src/common/perf_counters.cc @@ -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 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)) diff --git a/src/common/perf_counters.h b/src/common/perf_counters.h index 8887d9d5f80..23b32d5a449 100644 --- a/src/common/perf_counters.h +++ b/src/common/perf_counters.h @@ -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; diff --git a/src/common/perf_counters_cache.h b/src/common/perf_counters_cache.h index 03b21f38ba2..b67046eb7b9 100644 --- a/src/common/perf_counters_cache.h +++ b/src/common/perf_counters_cache.h @@ -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" diff --git a/src/common/pick_address.cc b/src/common/pick_address.cc index cca200b506b..81593fd0911 100644 --- a/src/common/pick_address.cc +++ b/src/common/pick_address.cc @@ -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 get_one_address( CephContext *cct, diff --git a/src/common/pick_address.h b/src/common/pick_address.h index c28a6037ded..94eec9ee0ac 100644 --- a/src/common/pick_address.h +++ b/src/common/pick_address.h @@ -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); diff --git a/src/common/shared_cache.hpp b/src/common/shared_cache.hpp index f20a930f6ab..d285e370ba5 100644 --- a/src/common/shared_cache.hpp +++ b/src/common/shared_cache.hpp @@ -17,7 +17,7 @@ #include #include -#ifdef WITH_SEASTAR +#ifdef WITH_CRIMSON #include #else #include @@ -31,7 +31,7 @@ template class SharedLRU { CephContext *cct; -#ifdef WITH_SEASTAR +#ifdef WITH_CRIMSON using VPtr = boost::local_shared_ptr; using WeakVPtr = boost::weak_ptr; #else diff --git a/src/common/version.cc b/src/common/version.cc index 1f25f629ef3..e6939541713 100644 --- a/src/common/version.cc +++ b/src/common/version.cc @@ -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 ; diff --git a/src/crimson/CMakeLists.txt b/src/crimson/CMakeLists.txt index b8f620c3036..1823b3076a3 100644 --- a/src/crimson/CMakeLists.txt +++ b/src/crimson/CMakeLists.txt @@ -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}" diff --git a/src/dmclock/src/dmclock_server.h b/src/dmclock/src/dmclock_server.h index 9d01dd62230..f27632bf34d 100644 --- a/src/dmclock/src/dmclock_server.h +++ b/src/dmclock/src/dmclock_server.h @@ -31,7 +31,7 @@ #include #include #include -#ifndef WITH_SEASTAR +#ifndef WITH_CRIMSON #include #include #include @@ -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 @@ -1811,6 +1811,6 @@ namespace crimson { } } }; // class PushPriorityQueue -#endif // !WITH_SEASTAR +#endif // !WITH_CRIMSON } // namespace dmclock } // namespace crimson diff --git a/src/global/global_context.cc b/src/global/global_context.cc index e87a01685cd..139e81d92a5 100644 --- a/src/global/global_context.cc +++ b/src/global/global_context.cc @@ -16,11 +16,11 @@ #include #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) diff --git a/src/include/buffer.h b/src/include/buffer.h index d8f4f306cc3..1cbd659f2a3 100644 --- a/src/include/buffer.h +++ b/src/include/buffer.h @@ -65,14 +65,14 @@ #define CEPH_BUFFER_API -#ifdef HAVE_SEASTAR +#ifdef WITH_CRIMSON namespace seastar { template class temporary_buffer; namespace net { class packet; } } -#endif // HAVE_SEASTAR +#endif // WITH_CRIMSON class deleter; template class DencDumper; @@ -149,7 +149,7 @@ struct error_code; ceph::unique_leakable_ptr create_small_page_aligned(unsigned len); ceph::unique_leakable_ptr 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 create(seastar::temporary_buffer&& 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() &; /// convert to temporary_buffer, stealing the ptr as its deleter operator seastar::temporary_buffer() &&; -#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 diff --git a/src/include/common_fwd.h b/src/include/common_fwd.h index e7ed9cae6a3..3c449513854 100644 --- a/src/include/common_fwd.h +++ b/src/include/common_fwd.h @@ -1,6 +1,6 @@ #pragma once -#ifdef WITH_SEASTAR +#ifdef WITH_CRIMSON #define TOPNSPC crimson #else #define TOPNSPC ceph diff --git a/src/include/utime.h b/src/include/utime.h index 86763fd5f88..1b7b600c23c 100644 --- a/src/include/utime.h +++ b/src/include/utime.h @@ -20,7 +20,7 @@ #include #include -#ifdef WITH_SEASTAR +#ifdef WITH_CRIMSON #include #endif @@ -93,7 +93,7 @@ public: tv.tv_nsec = std::max((std::chrono::duration_cast(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( t.time_since_epoch()).count(); diff --git a/src/kv/RocksDBStore.cc b/src/kv/RocksDBStore.cc index 72773c7c7da..cc6b2e7ced2 100644 --- a/src/kv/RocksDBStore.cc +++ b/src/kv/RocksDBStore.cc @@ -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" diff --git a/src/libcephsqlite.cc b/src/libcephsqlite.cc index 95280f6cc97..fa3164d893b 100644 --- a/src/libcephsqlite.cc +++ b/src/libcephsqlite.cc @@ -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" diff --git a/src/mds/FSMap.cc b/src/mds/FSMap.cc index ea8b78bb0f6..b4d2167790d 100644 --- a/src/mds/FSMap.cc +++ b/src/mds/FSMap.cc @@ -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" diff --git a/src/mds/Server.h b/src/mds/Server.h index d4ad3aecf5d..460618a319c 100644 --- a/src/mds/Server.h +++ b/src/mds/Server.h @@ -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" diff --git a/src/messages/MForward.h b/src/messages/MForward.h index d574a3751c5..cf1d8d47e78 100644 --- a/src/messages/MForward.h +++ b/src/messages/MForward.h @@ -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()) { diff --git a/src/messages/MOSDOp.h b/src/messages/MOSDOp.h index 0153fdbb272..4b1ea979ae2 100644 --- a/src/messages/MOSDOp.h +++ b/src/messages/MOSDOp.h @@ -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(); diff --git a/src/messages/MOSDPGNotify2.h b/src/messages/MOSDPGNotify2.h index ae17edae50f..17871227fd6 100644 --- a/src/messages/MOSDPGNotify2.h +++ b/src/messages/MOSDPGNotify2.h @@ -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() diff --git a/src/messages/MOSDPeeringOp.h b/src/messages/MOSDPeeringOp.h index bfb0380260c..7c1bf598485 100644 --- a/src/messages/MOSDPeeringOp.h +++ b/src/messages/MOSDPeeringOp.h @@ -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. diff --git a/src/mon/MonMap.cc b/src/mon/MonMap.cc index 8d0540d71f2..128c28a3a27 100644 --- a/src/mon/MonMap.cc +++ b/src/mon/MonMap.cc @@ -9,7 +9,7 @@ #include #include -#ifdef WITH_SEASTAR +#ifdef WITH_CRIMSON #include #include #include @@ -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 diff --git a/src/mon/MonMap.h b/src/mon/MonMap.h index dcdc2f531ab..7baa9bbd7cb 100644 --- a/src/mon/MonMap.h +++ b/src/mon/MonMap.h @@ -15,7 +15,7 @@ #ifndef CEPH_MONMAP_H #define CEPH_MONMAP_H -#ifdef WITH_SEASTAR +#ifdef WITH_CRIMSON #include #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 diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 9c062e6651e..ba0b91527b2 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -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" diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc index a25194260a2..2a6167ec2e1 100644 --- a/src/mon/Paxos.cc +++ b/src/mon/Paxos.cc @@ -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" diff --git a/src/msg/Message.cc b/src/msg/Message.cc index e0af298231f..db5b1f573ff 100644 --- a/src/msg/Message.cc +++ b/src/msg/Message.cc @@ -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; diff --git a/src/msg/Message.h b/src/msg/Message.h index 2088e2a858e..5c90fb832d7 100644 --- a/src/msg/Message.h +++ b/src/msg/Message.h @@ -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; diff --git a/src/msg/async/Stack.h b/src/msg/async/Stack.h index 4bef92055be..69e5dc58a59 100644 --- a/src/msg/async/Stack.h +++ b/src/msg/async/Stack.h @@ -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" diff --git a/src/os/ObjectStore.h b/src/os/ObjectStore.h index df3ae920a2f..90d5ef4cd5b 100644 --- a/src/os/ObjectStore.h +++ b/src/os/ObjectStore.h @@ -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 create( CephContext *cct, const std::string& type, diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index da6dea89315..5fb54c70185 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -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" diff --git a/src/osd/ClassHandler.cc b/src/osd/ClassHandler.cc index d1e726408fd..fc83391699e 100644 --- a/src/osd/ClassHandler.cc +++ b/src/osd/ClassHandler.cc @@ -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; } diff --git a/src/osd/DynamicPerfStats.h b/src/osd/DynamicPerfStats.h index c9ea7d09517..996baabb498 100644 --- a/src/osd/DynamicPerfStats.h +++ b/src/osd/DynamicPerfStats.h @@ -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()); diff --git a/src/osd/ECCommon.cc b/src/osd/ECCommon.cc index 5525906686f..633258c3fb0 100644 --- a/src/osd/ECCommon.cc +++ b/src/osd/ECCommon.cc @@ -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"); diff --git a/src/osd/ECCommon.h b/src/osd/ECCommon.h index 363f9890564..8135269274d 100644 --- a/src/osd/ECCommon.h +++ b/src/osd/ECCommon.h @@ -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" diff --git a/src/osd/ECCommonL.cc b/src/osd/ECCommonL.cc index 7bf517381ca..77a0d137fb7 100644 --- a/src/osd/ECCommonL.cc +++ b/src/osd/ECCommonL.cc @@ -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"); diff --git a/src/osd/ECCommonL.h b/src/osd/ECCommonL.h index e7b3348755f..d7994d27e7a 100644 --- a/src/osd/ECCommonL.h +++ b/src/osd/ECCommonL.h @@ -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" diff --git a/src/osd/ECListener.h b/src/osd/ECListener.h index e170520dac6..79a0542661b 100644 --- a/src/osd/ECListener.h +++ b/src/osd/ECListener.h @@ -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 *bless_unlocked_gencontext( GenContext *c) = 0; diff --git a/src/osd/OSDMap.h b/src/osd/OSDMap.h index 82f706837df..025420c4e63 100644 --- a/src/osd/OSDMap.h +++ b/src/osd/OSDMap.h @@ -40,7 +40,7 @@ #include "crush/CrushWrapper.h" -#ifdef WITH_SEASTAR +#ifdef WITH_CRIMSON #include #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; using OSDMapRef = crimson::local_shared_foreign_ptr; diff --git a/src/osd/OpRequest.h b/src/osd/OpRequest.h index 23f3b1d932e..f477c3d1f91 100644 --- a/src/osd/OpRequest.h +++ b/src/osd/OpRequest.h @@ -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); diff --git a/src/osd/PGLog.cc b/src/osd/PGLog.cc index 02813e22627..9e7c0405a63 100644 --- a/src/osd/PGLog.cc +++ b/src/osd/PGLog.cc @@ -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 { diff --git a/src/osd/PGLog.h b/src/osd/PGLog.h index c7feb870268..8c31aab2b72 100644 --- a/src/osd/PGLog.h +++ b/src/osd/PGLog.h @@ -33,7 +33,7 @@ #include #include -#ifdef WITH_SEASTAR +#ifdef WITH_CRIMSON #include #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, diff --git a/src/osd/PGTransaction.h b/src/osd/PGTransaction.h index bb6e4efc3f4..5055b3b42e7 100644 --- a/src/osd/PGTransaction.h +++ b/src/osd/PGTransaction.h @@ -19,7 +19,7 @@ #include #include "common/hobject.h" -#ifndef WITH_SEASTAR +#ifndef WITH_CRIMSON #include "osd/osd_internal_types.h" #else #include "crimson/osd/object_context.h" diff --git a/src/osd/PeeringState.cc b/src/osd/PeeringState.cc index 607c23f335b..7a3c911840d 100644 --- a/src/osd/PeeringState.cc +++ b/src/osd/PeeringState.cc @@ -2779,7 +2779,7 @@ void PeeringState::activate( psdout(10) << "activate peer osd." << peer << " " << pi << dendl; - #ifdef WITH_SEASTAR + #ifdef WITH_CRIMSON MURef m; #else MRef m; diff --git a/src/osd/PeeringState.h b/src/osd/PeeringState.h index b2cfd93c12d..9c3d4a8cb58 100644 --- a/src/osd/PeeringState.h +++ b/src/osd/PeeringState.h @@ -85,7 +85,7 @@ struct PeeringCtx; // [primary only] content recovery state struct BufferedRecoveryMessages { -#ifdef WITH_SEASTAR +#ifdef WITH_CRIMSON std::map> message_map; #else std::map> 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 diff --git a/src/osd/SnapMapper.cc b/src/osd/SnapMapper.cc index c484d59e58d..53abac11288 100644 --- a/src/osd/SnapMapper.cc +++ b/src/osd/SnapMapper.cc @@ -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 @@ -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 * * __ @@ -1142,4 +1142,4 @@ int SnapMapper::convert_legacy( } return 0; } -#endif // !WITH_SEASTAR +#endif // !WITH_CRIMSON diff --git a/src/osd/SnapMapper.h b/src/osd/SnapMapper.h index 15397e92d1b..136d8a67902 100644 --- a/src/osd/SnapMapper.h +++ b/src/osd/SnapMapper.h @@ -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 { -#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; diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index c654cb71cd6..49fd0e1939f 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -29,7 +29,7 @@ #include #include -#ifdef WITH_SEASTAR +#ifdef WITH_CRIMSON #include #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; #else using OSDMapRef = std::shared_ptr; diff --git a/src/osd/scheduler/mClockScheduler.cc b/src/osd/scheduler/mClockScheduler.cc index 33f2d6b7906..225873a2f64 100644 --- a/src/osd/scheduler/mClockScheduler.cc +++ b/src/osd/scheduler/mClockScheduler.cc @@ -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" diff --git a/src/osd/scrubber/osd_scrub_sched.h b/src/osd/scrubber/osd_scrub_sched.h index c30532ce0d9..c3092c3e871 100644 --- a/src/osd/scrubber/osd_scrub_sched.h +++ b/src/osd/scrubber/osd_scrub_sched.h @@ -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; } diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index 0a423b1b4e1..42dfff2914d 100644 --- a/src/osdc/ObjectCacher.cc +++ b/src/osdc/ObjectCacher.cc @@ -13,7 +13,7 @@ #include -#ifdef WITH_SEASTAR +#ifdef WITH_CRIMSON #include "crimson/common/perf_counters_collection.h" #else #include "common/perf_counters_collection.h" diff --git a/src/rgw/rgw_dmclock_scheduler_ctx.h b/src/rgw/rgw_dmclock_scheduler_ctx.h index c0e986635e7..e93b527b9fe 100644 --- a/src/rgw/rgw_dmclock_scheduler_ctx.h +++ b/src/rgw/rgw_dmclock_scheduler_ctx.h @@ -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" diff --git a/src/rgw/rgw_dmclock_sync_scheduler.cc b/src/rgw/rgw_dmclock_sync_scheduler.cc index de1f064acf7..942d5e98d43 100644 --- a/src/rgw/rgw_dmclock_sync_scheduler.cc +++ b/src/rgw/rgw_dmclock_sync_scheduler.cc @@ -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" diff --git a/src/script/run-make.sh b/src/script/run-make.sh index f7868a42566..e9a07ac2121 100755 --- a/src/script/run-make.sh +++ b/src/script/run-make.sh @@ -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" diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index 76e93052df7..449d3eb1085 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -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) diff --git a/src/test/fio/fio_ceph_objectstore.cc b/src/test/fio/fio_ceph_objectstore.cc index ebde1680f0a..14141392d3a 100644 --- a/src/test/fio/fio_ceph_objectstore.cc +++ b/src/test/fio/fio_ceph_objectstore.cc @@ -30,7 +30,7 @@ #include "include/ceph_assert.h" // fio.h clobbers our assert.h #include -#ifdef WITH_SEASTAR +#ifdef WITH_CRIMSON #include "crimson/common/perf_counters_collection.h" #else #include "common/perf_counters_collection.h" diff --git a/src/test/rgw/test_rgw_amqp.cc b/src/test/rgw/test_rgw_amqp.cc index 7fa6f6f5444..24b80c1faff 100644 --- a/src/test/rgw/test_rgw_amqp.cc +++ b/src/test/rgw/test_rgw_amqp.cc @@ -21,7 +21,7 @@ class CctCleaner { public: CctCleaner(CephContext* _cct) : cct(_cct) {} ~CctCleaner() { -#ifdef WITH_SEASTAR +#ifdef WITH_CRIMSON delete cct; #else cct->put(); diff --git a/src/test/rgw/test_rgw_lua.cc b/src/test/rgw/test_rgw_lua.cc index d5291f81154..8cd23b90b2f 100644 --- a/src/test/rgw/test_rgw_lua.cc +++ b/src/test/rgw/test_rgw_lua.cc @@ -22,7 +22,7 @@ class CctCleaner { public: CctCleaner(CephContext* _cct) : cct(_cct) {} ~CctCleaner() { -#ifdef WITH_SEASTAR +#ifdef WITH_CRIMSON delete cct; #else cct->put(); -- 2.39.5