From 043816396cd45ea222f0483ad3c0382489da53b8 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sun, 17 Sep 2017 17:35:31 -0500 Subject: [PATCH] osd/PG: get_need_up_thru(), get_same_interval_since() Signed-off-by: Sage Weil --- src/osd/OSD.cc | 8 ++++---- src/osd/PG.h | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 1910b9f3eb99a..f64667a6f91c8 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -4121,9 +4121,9 @@ int OSD::handle_pg_peering_evt( } } else { // already had it. did the mapping change? - if (epoch < pg->info.history.same_interval_since) { + if (epoch < pg->get_same_interval_since()) { dout(10) << *pg << __func__ << " acting changed in " - << pg->info.history.same_interval_since + << pg->get_same_interval_since() << " (msg from " << epoch << ")" << dendl; } else { pg->queue_peering_event(evt); @@ -9053,8 +9053,8 @@ void OSD::process_peering_events( } else { pg->process_peering_event(&rctx); } - need_up_thru = pg->need_up_thru || need_up_thru; - same_interval_since = MAX(pg->info.history.same_interval_since, + need_up_thru = pg->get_need_up_thru() || need_up_thru; + same_interval_since = MAX(pg->get_same_interval_since(), same_interval_since); if (!split_pgs.empty()) { rctx.on_applied->add(new C_CompleteSplits(this, split_pgs)); diff --git a/src/osd/PG.h b/src/osd/PG.h index fe4571477caba..bb016f95b3982 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -326,6 +326,12 @@ public: const pg_history_t& get_history() const { return info.history; } + bool get_need_up_thru() const { + return need_up_thru; + } + epoch_t get_same_interval_since() const { + return info.history.same_interval_since; + } void set_last_scrub_stamp(utime_t t) { info.history.last_scrub_stamp = t; -- 2.39.5