From 571195955c2bd529d65c4d145e31788fc31f97f7 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Fri, 3 May 2019 12:14:09 -0700 Subject: [PATCH] PeeringState: switch remaining boost::optional users Signed-off-by: Samuel Just --- src/osd/PeeringState.cc | 12 ++++++------ src/osd/PeeringState.h | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/osd/PeeringState.cc b/src/osd/PeeringState.cc index 75f56677a67d2..3025c2aa776e3 100644 --- a/src/osd/PeeringState.cc +++ b/src/osd/PeeringState.cc @@ -161,7 +161,7 @@ void PeeringState::begin_block_outgoing() { void PeeringState::clear_blocked_outgoing() { ceph_assert(orig_ctx); ceph_assert(rctx); - messages_pending_flush = boost::optional(); + messages_pending_flush = std::optional(); } void PeeringState::end_block_outgoing() { @@ -171,7 +171,7 @@ void PeeringState::end_block_outgoing() { orig_ctx->accept_buffered_messages(*messages_pending_flush); rctx.emplace(*orig_ctx); - messages_pending_flush = boost::optional(); + messages_pending_flush = std::optional(); } void PeeringState::end_handle() { @@ -3436,8 +3436,8 @@ void PeeringState::update_stats( bool PeeringState::append_log_entries_update_missing( const mempool::osd_pglog::list &entries, - ObjectStore::Transaction &t, boost::optional trim_to, - boost::optional roll_forward_to) + ObjectStore::Transaction &t, std::optional trim_to, + std::optional roll_forward_to) { ceph_assert(!entries.empty()); ceph_assert(entries.begin()->version > info.last_update); @@ -3478,8 +3478,8 @@ bool PeeringState::append_log_entries_update_missing( void PeeringState::merge_new_log_entries( const mempool::osd_pglog::list &entries, ObjectStore::Transaction &t, - boost::optional trim_to, - boost::optional roll_forward_to) + std::optional trim_to, + std::optional roll_forward_to) { psdout(10) << __func__ << " " << entries << dendl; ceph_assert(is_primary()); diff --git a/src/osd/PeeringState.h b/src/osd/PeeringState.h index c11dfa71be299..9d9a27cf05c7f 100644 --- a/src/osd/PeeringState.h +++ b/src/osd/PeeringState.h @@ -1212,7 +1212,7 @@ public: PeeringCtx *orig_ctx; /// populated if we are buffering messages pending a flush - boost::optional messages_pending_flush; + std::optional messages_pending_flush; /** * populated between start_handle() and end_handle(), points into @@ -1619,8 +1619,8 @@ public: bool append_log_entries_update_missing( const mempool::osd_pglog::list &entries, ObjectStore::Transaction &t, - boost::optional trim_to, - boost::optional roll_forward_to); + std::optional trim_to, + std::optional roll_forward_to); /** * Updates local log to reflect new write from primary. @@ -1639,8 +1639,8 @@ public: void merge_new_log_entries( const mempool::osd_pglog::list &entries, ObjectStore::Transaction &t, - boost::optional trim_to, - boost::optional roll_forward_to); + std::optional trim_to, + std::optional roll_forward_to); /// Update missing set to reflect e (TODOSAM: not sure why this is needed) void add_local_next_event(const pg_log_entry_t& e) { -- 2.39.5