]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: rename require_same_or_newer_map -> is_same_or_newer_map
authorSage Weil <sage@inktank.com>
Fri, 8 Mar 2013 16:53:40 +0000 (08:53 -0800)
committerSamuel Just <sam.just@inktank.com>
Fri, 8 Mar 2013 20:40:36 +0000 (12:40 -0800)
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 <sage@inktank.com>
src/osd/PG.cc
src/osd/PG.h
src/osd/ReplicatedPG.cc

index 90e6c0fcd5db309bf27c7686d740ddf27acf31aa..65298a5414745d7a28ccb137730e13b30af23140 100644 (file)
@@ -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<MOSDOp*>(op->request)->get_map_epoch());
 
   case MSG_OSD_SUBOP:
-    return !require_same_or_newer_map(
+    return !have_same_or_newer_map(
       static_cast<MOSDSubOp*>(op->request)->map_epoch);
 
   case MSG_OSD_SUBOPREPLY:
-    return !require_same_or_newer_map(
+    return !have_same_or_newer_map(
       static_cast<MOSDSubOpReply*>(op->request)->map_epoch);
 
   case MSG_OSD_PG_SCAN:
-    return !require_same_or_newer_map(
+    return !have_same_or_newer_map(
       static_cast<MOSDPGScan*>(op->request)->map_epoch);
 
   case MSG_OSD_PG_BACKFILL:
-    return !require_same_or_newer_map(
+    return !have_same_or_newer_map(
       static_cast<MOSDPGBackfill*>(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;
index c7c63b725d03165d1dcd0be259f0a2b9f3b8bca3..44aeb75235bc8e96f6287166e6aff4b05400a4b3 100644 (file)
@@ -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();
   }
 
index ea71f2b81e8af952fe3f5eb77e557ac35943c911..e77e9aa63656160d822560be572c4d86da2eb04b 100644 (file)
@@ -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<MOSDSubOp*>(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;