From: Sage Weil Date: Fri, 8 Mar 2013 16:53:40 +0000 (-0800) Subject: osd/PG: rename require_same_or_newer_map -> is_same_or_newer_map X-Git-Tag: v0.59~25^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ba7e815a18cad110525f228db1b3fe39e011409e;p=ceph.git 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 --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 90e6c0fcd5db..65298a541474 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 c7c63b725d03..44aeb75235bc 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 ea71f2b81e8a..e77e9aa63656 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;