From b3d12158475024e86cf9fd714f44b5894ec97d32 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Wed, 29 May 2019 17:31:38 -0700 Subject: [PATCH] src/osd/: add appropriate OSDMapRef defs for seastar to OSDMap,osd_types Signed-off-by: Samuel Just --- src/osd/OSDMap.h | 8 +++++++- src/osd/osd_types.h | 10 ++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/osd/OSDMap.h b/src/osd/OSDMap.h index 37a7380e983..a18612e4a33 100644 --- a/src/osd/OSDMap.h +++ b/src/osd/OSDMap.h @@ -30,6 +30,7 @@ #include #include +#include #include "include/btree_map.h" #include "include/types.h" #include "common/ceph_releases.h" @@ -1504,7 +1505,12 @@ public: WRITE_CLASS_ENCODER_FEATURES(OSDMap) WRITE_CLASS_ENCODER_FEATURES(OSDMap::Incremental) -typedef std::shared_ptr OSDMapRef; +#ifdef WITH_SEASTAR +using OSDMapRef = boost::local_shared_ptr; +#else +using OSDMapRef = std::shared_ptr; +#endif + inline std::ostream& operator<<(std::ostream& out, const OSDMap& m) { m.print_oneline_summary(out); diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index fc81d58c228..a86c840b815 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -27,6 +27,7 @@ #include #include #include +#include #include "include/rados/rados_types.hpp" #include "include/mempool.h" @@ -3014,6 +3015,11 @@ class OSDMap; * the might_have_unfound set */ class PastIntervals { +#ifdef WITH_SEASTAR + using OSDMapRef = boost::local_shared_ptr; +#else + using OSDMapRef = std::shared_ptr; +#endif public: struct pg_interval_t { std::vector up, acting; @@ -3192,8 +3198,8 @@ public: const std::vector &new_up, ///< [in] up as of osdmap epoch_t same_interval_since, ///< [in] as of osdmap epoch_t last_epoch_clean, ///< [in] current - std::shared_ptr osdmap, ///< [in] current map - std::shared_ptr lastmap, ///< [in] last map + OSDMapRef osdmap, ///< [in] current map + OSDMapRef lastmap, ///< [in] last map pg_t pgid, ///< [in] pgid for pg const IsPGRecoverablePredicate &could_have_gone_active, ///< [in] predicate whether the pg can be active PastIntervals *past_intervals, ///< [out] intervals -- 2.39.5