From: Matan Breizman Date: Wed, 5 Feb 2025 15:34:37 +0000 (+0000) Subject: */: Cleanup WITH_ALIENSTORE X-Git-Tag: v20.3.0~350^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b6f3cda55974cd4068773bcee1077e2afd4def06;p=ceph.git */: Cleanup WITH_ALIENSTORE Signed-off-by: Matan Breizman --- diff --git a/src/common/Finisher.cc b/src/common/Finisher.cc index 9d2792fc252..b8e7f3e6342 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) -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR #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 a2667757399..6dfdd4a592b 100644 --- a/src/common/RefCountedObj.h +++ b/src/common/RefCountedObj.h @@ -89,7 +89,7 @@ template virtual ~RefCountedObjectSafe() override {} }; -#if !defined(WITH_SEASTAR)|| defined(WITH_ALIEN) +#ifndef WITH_SEASTAR /** * 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 // !defined(WITH_SEASTAR)|| defined(WITH_ALIEN) +#endif // ifndef WITH_SEASTAR static inline void intrusive_ptr_add_ref(const RefCountedObject *p) { p->get(); diff --git a/src/common/Throttle.h b/src/common/Throttle.h index fdafb076475..b46878994ed 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" -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR #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 2cfe470488f..cbfc0b8e25e 100644 --- a/src/common/TrackedOp.h +++ b/src/common/TrackedOp.h @@ -24,7 +24,7 @@ #include "include/spinlock.h" #include "msg/Message.h" -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR #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 f30dc08e6d1..f51c59b9f9e 100644 --- a/src/common/WorkQueue.h +++ b/src/common/WorkQueue.h @@ -15,7 +15,7 @@ #ifndef CEPH_WORKQUEUE_H #define CEPH_WORKQUEUE_H -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR // for ObjectStore.h struct ThreadPool { struct TPHandle { diff --git a/src/common/admin_socket.h b/src/common/admin_socket.h index 9f7f8339577..4183ad30fb3 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 -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR #include "crimson/admin/admin_socket.h" #else diff --git a/src/common/ceph_context.cc b/src/common/ceph_context.cc index 4bf1086e31d..76feeb2e2af 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" -#if !(defined(WITH_SEASTAR) && !defined(WITH_ALIEN)) +#ifndef WITH_SEASTAR #include "mon/MonMap.h" #endif @@ -64,7 +64,7 @@ using ceph::bufferlist; using ceph::HeartbeatMap; -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR namespace crimson::common { CephContext::CephContext() : _conf{crimson::common::local_conf()}, diff --git a/src/common/ceph_context.h b/src/common/ceph_context.h index 6a02d5c5bf1..6e2d710e9f6 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" -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR #include "crimson/common/config_proxy.h" #include "crimson/common/perf_counters_collection.h" #else @@ -66,7 +66,7 @@ namespace ceph { } } -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR namespace crimson::common { class CephContext { public: @@ -423,7 +423,7 @@ private: #endif #endif // WITH_SEASTAR -#if !(defined(WITH_SEASTAR) && !defined(WITH_ALIEN)) && defined(__cplusplus) +#if !defined(WITH_SEASTAR) && defined(__cplusplus) namespace ceph::common { inline void intrusive_ptr_add_ref(CephContext* cct) { @@ -435,5 +435,5 @@ inline void intrusive_ptr_release(CephContext* cct) cct->put(); } } -#endif // !(defined(WITH_SEASTAR) && !defined(WITH_ALIEN)) && defined(__cplusplus) +#endif // !defined(WITH_SEASTAR) && defined(__cplusplus) #endif diff --git a/src/common/ceph_mutex.h b/src/common/ceph_mutex.h index 6ed8c56d5da..7430472cc95 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. -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR #include #include "crimson/common/log.h" @@ -87,7 +87,7 @@ namespace ceph { #define ceph_mutex_is_locked_by_me(m) true } -#else // defined (WITH_SEASTAR) && !defined(WITH_ALIEN) +#else // ifdef WITH_SEASTAR // // For legacy Mutex users that passed recursive=true, use // ceph::make_recursive_mutex. For legacy Mutex users that passed diff --git a/src/common/dout.h b/src/common/dout.h index 8d05b12fbe2..bec46d1f698 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" -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR #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 -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR #define dout_impl(cct, sub, v) \ do { \ if (crimson::common::local_conf()->subsys.should_gather(sub, v)) { \ diff --git a/src/common/mempool.cc b/src/common/mempool.cc index 4ecfaf81fc6..9358727e148 100644 --- a/src/common/mempool.cc +++ b/src/common/mempool.cc @@ -15,7 +15,7 @@ #include "include/mempool.h" #include "include/demangle.h" -#if defined(_GNU_SOURCE) && defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#if defined(_GNU_SOURCE) && defined(WITH_SEASTAR) #else // Thread local variables should save index, not &shard[index], // because shard[] is defined in the class @@ -98,7 +98,7 @@ size_t mempool::pool_t::allocated_items() const void mempool::pool_t::adjust_count(ssize_t items, ssize_t bytes) { -#if defined(_GNU_SOURCE) && defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#if defined(_GNU_SOURCE) && defined(WITH_SEASTAR) // the expected path: we alway pick the shard for a cpu core // a thread is executing on. const size_t shard_index = pick_a_shard_int(); @@ -128,7 +128,7 @@ void mempool::pool_t::get_stats( for (auto &p : type_map) { std::string n = ceph_demangle(p.second.type_name); stats_t &s = (*by_type)[n]; -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR s.bytes = 0; s.items = 0; for (size_t i = 0 ; i < num_shards; ++i) { diff --git a/src/common/perf_counters.cc b/src/common/perf_counters.cc index 17828fda8dd..14949fdcffd 100644 --- a/src/common/perf_counters.cc +++ b/src/common/perf_counters.cc @@ -531,7 +531,7 @@ PerfCounters::PerfCounters(CephContext *cct, const std::string &name, m_lower_bound(lower_bound), m_upper_bound(upper_bound), m_name(name) -#if !defined(WITH_SEASTAR) || defined(WITH_ALIEN) +#ifndef WITH_SEASTAR , 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 411f9abecdf..80a17d10bc8 100644 --- a/src/common/perf_counters.h +++ b/src/common/perf_counters.h @@ -305,7 +305,7 @@ private: int prio_adjust = 0; -#if !defined(WITH_SEASTAR) || defined(WITH_ALIEN) +#ifndef WITH_SEASTAR const std::string m_lock_name; /** Protects m_data */ ceph::mutex m_lock; diff --git a/src/global/global_context.cc b/src/global/global_context.cc index 0fea21d558a..e87a01685cd 100644 --- a/src/global/global_context.cc +++ b/src/global/global_context.cc @@ -16,11 +16,11 @@ #include #include "common/ceph_context.h" -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR #include "crimson/common/config_proxy.h" #endif -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR 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() { -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR return crimson::common::local_conf(); #else return g_ceph_context->_conf; #endif } -#ifdef WITH_ALIEN +#ifndef WITH_SEASTAR int g_conf_set_val(const std::string& key, const std::string& s) { if (g_ceph_context != NULL) diff --git a/src/include/common_fwd.h b/src/include/common_fwd.h index d906aadfa46..e7ed9cae6a3 100644 --- a/src/include/common_fwd.h +++ b/src/include/common_fwd.h @@ -1,6 +1,6 @@ #pragma once -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR #define TOPNSPC crimson #else #define TOPNSPC ceph diff --git a/src/include/mempool.h b/src/include/mempool.h index a6dca48dd6f..4535bffcde7 100644 --- a/src/include/mempool.h +++ b/src/include/mempool.h @@ -26,7 +26,7 @@ #include #include -#if defined(_GNU_SOURCE) && defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#if defined(_GNU_SOURCE) && defined(WITH_SEASTAR) # include #endif @@ -206,7 +206,7 @@ enum { }; static size_t pick_a_shard_int() { -#if defined(_GNU_SOURCE) && defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#if defined(_GNU_SOURCE) && defined(WITH_SEASTAR) // a thread local storage is actually just an approximation; // what we truly want is a _cpu local storage_. // @@ -262,7 +262,7 @@ const char *get_pool_name(pool_index_t ix); struct type_t { const char *type_name; size_t item_size; -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR struct type_shard_t { ceph::atomic items = {0}; // signed char __padding[128 - sizeof(ceph::atomic)]; @@ -366,7 +366,7 @@ public: shard.bytes += total; shard.items += n; if (type) { -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR type->shards[shid].items += n; #else type->items += n; @@ -383,7 +383,7 @@ public: shard.bytes -= total; shard.items -= n; if (type) { -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR type->shards[shid].items -= n; #else type->items -= n; @@ -399,7 +399,7 @@ public: shard.bytes += total; shard.items += n; if (type) { -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR type->shards[shid].items += n; #else type->items += n; @@ -420,7 +420,7 @@ public: shard.bytes -= total; shard.items -= n; if (type) { -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR type->shards[shid].items -= n; #else type->items -= n; diff --git a/src/include/utime.h b/src/include/utime.h index 588280a7df1..86763fd5f88 100644 --- a/src/include/utime.h +++ b/src/include/utime.h @@ -20,7 +20,7 @@ #include #include -#if defined(WITH_SEASTAR) +#ifdef WITH_SEASTAR #include #endif @@ -93,7 +93,7 @@ public: tv.tv_nsec = std::max((std::chrono::duration_cast(dur) % std::chrono::seconds(1)).count(), 0); } -#if defined(WITH_SEASTAR) +#ifdef WITH_SEASTAR 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 9170b1468a1..72773c7c7da 100644 --- a/src/kv/RocksDBStore.cc +++ b/src/kv/RocksDBStore.cc @@ -35,7 +35,7 @@ #include "common/debug.h" -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR #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 1d9d7e4954e..95280f6cc97 100644 --- a/src/libcephsqlite.cc +++ b/src/libcephsqlite.cc @@ -52,7 +52,7 @@ SQLITE_EXTENSION_INIT1 #include "include/libcephsqlite.h" #include "SimpleRADOSStriper.h" -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR #include "crimson/common/perf_counters_collection.h" #else #include "common/perf_counters_collection.h" diff --git a/src/mds/Server.h b/src/mds/Server.h index bc1a15d35a6..8ac82804427 100644 --- a/src/mds/Server.h +++ b/src/mds/Server.h @@ -26,7 +26,7 @@ #include "CInode.h" #include "Mutation.h" -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR #include "crimson/common/perf_counters_collection.h" #else #include "common/perf_counters_collection.h" diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 9a4e11e5aeb..748a83f7c7c 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -96,7 +96,7 @@ #include "auth/none/AuthNoneClientHandler.h" -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR #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 5d2a12a1a1d..a25194260a2 100644 --- a/src/mon/Paxos.cc +++ b/src/mon/Paxos.cc @@ -23,7 +23,7 @@ #include "common/Timer.h" #include "messages/PaxosServiceMessage.h" -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR #include "crimson/common/perf_counters_collection.h" #else #include "common/perf_counters_collection.h" diff --git a/src/msg/async/Stack.h b/src/msg/async/Stack.h index 436e0859b0a..4bef92055be 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" -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR #include "crimson/common/perf_counters_collection.h" #else #include "common/perf_counters_collection.h" diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index 84341515921..4016ba92560 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" -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR #include "crimson/common/perf_counters_collection.h" #else #include "common/perf_counters_collection.h" diff --git a/src/osd/PeeringState.cc b/src/osd/PeeringState.cc index 9f111285cbc..4f1a30efebc 100644 --- a/src/osd/PeeringState.cc +++ b/src/osd/PeeringState.cc @@ -2775,7 +2775,7 @@ void PeeringState::activate( psdout(10) << "activate peer osd." << peer << " " << pi << dendl; - #if defined(WITH_SEASTAR) + #ifdef WITH_SEASTAR MURef m; #else MRef m; diff --git a/src/osd/PeeringState.h b/src/osd/PeeringState.h index 518baa4d704..f1c552b2120 100644 --- a/src/osd/PeeringState.h +++ b/src/osd/PeeringState.h @@ -79,7 +79,7 @@ struct PeeringCtx; // [primary only] content recovery state struct BufferedRecoveryMessages { -#if defined(WITH_SEASTAR) +#ifdef WITH_SEASTAR std::map> message_map; #else std::map> message_map; @@ -287,7 +287,7 @@ public: virtual uint64_t get_snap_trimq_size() const = 0; /// Send cluster message to osd - #if defined(WITH_SEASTAR) + #ifdef WITH_SEASTAR virtual void send_cluster_message( int osd, MessageURef m, epoch_t epoch, bool share_map_update=false) = 0; #else diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index c43dad34b1b..0a423b1b4e1 100644 --- a/src/osdc/ObjectCacher.cc +++ b/src/osdc/ObjectCacher.cc @@ -13,7 +13,7 @@ #include -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR #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 a74c8043e8b..c0e986635e7 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" -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR #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 918b70ffc39..de1f064acf7 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" -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR #include "crimson/common/perf_counters_collection.h" #else #include "common/perf_counters_collection.h" diff --git a/src/test/fio/fio_ceph_objectstore.cc b/src/test/fio/fio_ceph_objectstore.cc index b320c8a72c9..ebde1680f0a 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 -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#ifdef WITH_SEASTAR #include "crimson/common/perf_counters_collection.h" #else #include "common/perf_counters_collection.h"