From ba7e815a18cad110525f228db1b3fe39e011409e Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 8 Mar 2013 08:53:40 -0800 Subject: [PATCH] osd/PG: rename require_same_or_newer_map -> is_same_or_newer_map This avoids confusion with the OSD method of the same name, and better matches what the function tests (and does not do). Signed-off-by: Sage Weil --- src/osd/PG.cc | 12 ++++++------ src/osd/PG.h | 2 +- src/osd/ReplicatedPG.cc | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 90e6c0fcd5db3..65298a5414745 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -4900,23 +4900,23 @@ bool PG::must_delay_request(OpRequestRef op) { switch (op->request->get_type()) { case CEPH_MSG_OSD_OP: - return !require_same_or_newer_map( + return !have_same_or_newer_map( static_cast(op->request)->get_map_epoch()); case MSG_OSD_SUBOP: - return !require_same_or_newer_map( + return !have_same_or_newer_map( static_cast(op->request)->map_epoch); case MSG_OSD_SUBOPREPLY: - return !require_same_or_newer_map( + return !have_same_or_newer_map( static_cast(op->request)->map_epoch); case MSG_OSD_PG_SCAN: - return !require_same_or_newer_map( + return !have_same_or_newer_map( static_cast(op->request)->map_epoch); case MSG_OSD_PG_BACKFILL: - return !require_same_or_newer_map( + return !have_same_or_newer_map( static_cast(op->request)->map_epoch); } assert(0); @@ -4937,7 +4937,7 @@ void PG::take_waiters() void PG::handle_peering_event(CephPeeringEvtRef evt, RecoveryCtx *rctx) { dout(10) << "handle_peering_event: " << evt->get_desc() << dendl; - if (!require_same_or_newer_map(evt->get_epoch_sent())) { + if (!have_same_or_newer_map(evt->get_epoch_sent())) { dout(10) << "deferring event " << evt->get_desc() << dendl; peering_waiters.push_back(evt); return; diff --git a/src/osd/PG.h b/src/osd/PG.h index c7c63b725d031..44aeb75235bc8 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -1871,7 +1871,7 @@ public: bool old_peering_evt(CephPeeringEvtRef evt) { return old_peering_msg(evt->get_epoch_sent(), evt->get_epoch_requested()); } - bool require_same_or_newer_map(epoch_t e) { + bool have_same_or_newer_map(epoch_t e) { return e <= get_osdmap()->get_epoch(); } diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index ea71f2b81e8af..e77e9aa636561 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -1108,7 +1108,7 @@ void ReplicatedPG::log_subop_stats(OpRequestRef op, int tag_inb, int tag_lat) void ReplicatedPG::do_sub_op(OpRequestRef op) { MOSDSubOp *m = static_cast(op->request); - assert(require_same_or_newer_map(m->map_epoch)); + assert(have_same_or_newer_map(m->map_epoch)); assert(m->get_header().type == MSG_OSD_SUBOP); dout(15) << "do_sub_op " << *op->request << dendl; -- 2.39.5