]> 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)
committerSage Weil <sage@inktank.com>
Tue, 12 Mar 2013 00:46:06 +0000 (17:46 -0700)
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>
(cherry picked from commit ba7e815a18cad110525f228db1b3fe39e011409e)

Conflicts:

src/osd/ReplicatedPG.cc

src/osd/PG.cc
src/osd/PG.h
src/osd/ReplicatedPG.cc

index a69dd5d20b5906f767f13073a14e8cf0b96eeef4..ae79cb03a28328d4692bd9a8772618a3462e01f2 100644 (file)
@@ -5011,23 +5011,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);
@@ -5048,7 +5048,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 70e2756a9bbb026166197e2a0de69dcd0a03f173..0265972b752b0f24934776d8501e12063a0f035a 100644 (file)
@@ -1833,7 +1833,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 c8096efb1807f3b6b2e23d23dec1c7a26c82d87b..8152240102cfe6e6274929e401a48afdb364cec3 100644 (file)
@@ -1096,7 +1096,7 @@ void ReplicatedPG::log_subop_stats(OpRequestRef op, int tag_inb, int tag_lat)
 void ReplicatedPG::do_sub_op(OpRequestRef op)
 {
   MOSDSubOp *m = (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;