]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: remove unused op_must_wait_for_map
authorSage Weil <sage@redhat.com>
Tue, 28 Feb 2017 02:14:57 +0000 (20:14 -0600)
committerSage Weil <sage@redhat.com>
Mon, 1 May 2017 20:35:11 +0000 (15:35 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc
src/osd/PG.h

index 4ebeeadc967e783fd4c559742ae7cd6485efd347..983bd825de00a937b17b59c376ad1d15f1ee3f66 100644 (file)
@@ -5609,116 +5609,6 @@ bool PG::can_discard_request(OpRequestRef& op)
   return true;
 }
 
-bool PG::op_must_wait_for_map(epoch_t cur_epoch, OpRequestRef& op)
-{
-  switch (op->get_req()->get_type()) {
-  case CEPH_MSG_OSD_OP:
-    return !have_same_or_newer_map(
-      cur_epoch,
-      static_cast<const MOSDOp*>(op->get_req())->get_map_epoch());
-
-  case CEPH_MSG_OSD_BACKOFF:
-    return false; // we don't care about maps
-
-  case MSG_OSD_SUBOP:
-    return !have_same_or_newer_map(
-      cur_epoch,
-      static_cast<const MOSDSubOp*>(op->get_req())->map_epoch);
-
-  case MSG_OSD_REPOP:
-    return !have_same_or_newer_map(
-      cur_epoch,
-      static_cast<const MOSDRepOp*>(op->get_req())->map_epoch);
-
-  case MSG_OSD_SUBOPREPLY:
-    return !have_same_or_newer_map(
-      cur_epoch,
-      static_cast<const MOSDSubOpReply*>(op->get_req())->map_epoch);
-
-  case MSG_OSD_REPOPREPLY:
-    return !have_same_or_newer_map(
-      cur_epoch,
-      static_cast<const MOSDRepOpReply*>(op->get_req())->map_epoch);
-
-  case MSG_OSD_PG_SCAN:
-    return !have_same_or_newer_map(
-      cur_epoch,
-      static_cast<const MOSDPGScan*>(op->get_req())->map_epoch);
-
-  case MSG_OSD_PG_BACKFILL:
-    return !have_same_or_newer_map(
-      cur_epoch,
-      static_cast<const MOSDPGBackfill*>(op->get_req())->map_epoch);
-
-  case MSG_OSD_PG_BACKFILL_REMOVE:
-    return !have_same_or_newer_map(
-      cur_epoch,
-      static_cast<const MOSDPGBackfillRemove*>(op->get_req())->map_epoch);
-
-  case MSG_OSD_PG_PUSH:
-    return !have_same_or_newer_map(
-      cur_epoch,
-      static_cast<const MOSDPGPush*>(op->get_req())->map_epoch);
-
-  case MSG_OSD_PG_PULL:
-    return !have_same_or_newer_map(
-      cur_epoch,
-      static_cast<const MOSDPGPull*>(op->get_req())->map_epoch);
-
-  case MSG_OSD_PG_PUSH_REPLY:
-    return !have_same_or_newer_map(
-      cur_epoch,
-      static_cast<const MOSDPGPushReply*>(op->get_req())->map_epoch);
-
-  case MSG_OSD_EC_WRITE:
-    return !have_same_or_newer_map(
-      cur_epoch,
-      static_cast<const MOSDECSubOpWrite*>(op->get_req())->map_epoch);
-
-  case MSG_OSD_EC_WRITE_REPLY:
-    return !have_same_or_newer_map(
-      cur_epoch,
-      static_cast<const MOSDECSubOpWriteReply*>(op->get_req())->map_epoch);
-
-  case MSG_OSD_EC_READ:
-    return !have_same_or_newer_map(
-      cur_epoch,
-      static_cast<const MOSDECSubOpRead*>(op->get_req())->map_epoch);
-
-  case MSG_OSD_EC_READ_REPLY:
-    return !have_same_or_newer_map(
-      cur_epoch,
-      static_cast<const MOSDECSubOpReadReply*>(op->get_req())->map_epoch);
-
-  case MSG_OSD_REP_SCRUB:
-    return !have_same_or_newer_map(
-      cur_epoch,
-      static_cast<const MOSDRepScrub*>(op->get_req())->map_epoch);
-
-  case MSG_OSD_SCRUB_RESERVE:
-    return !have_same_or_newer_map(
-      cur_epoch,
-      static_cast<const MOSDScrubReserve*>(op->get_req())->map_epoch);
-
-  case MSG_OSD_REP_SCRUBMAP:
-    return !have_same_or_newer_map(
-      cur_epoch,
-      static_cast<const MOSDRepScrubMap*>(op->get_req())->map_epoch);
-
-  case MSG_OSD_PG_UPDATE_LOG_MISSING:
-    return !have_same_or_newer_map(
-      cur_epoch,
-      static_cast<const MOSDPGUpdateLogMissing*>(op->get_req())->map_epoch);
-
-  case MSG_OSD_PG_UPDATE_LOG_MISSING_REPLY:
-    return !have_same_or_newer_map(
-      cur_epoch,
-      static_cast<const MOSDPGUpdateLogMissingReply*>(op->get_req())->map_epoch);
-  }
-  ceph_abort();
-  return false;
-}
-
 void PG::take_waiters()
 {
   dout(10) << "take_waiters" << dendl;
index ea96417d5f86068cd0711a49e4614265d76e3bad..f3811d8aebd09a383601a2a1269aa7396ce4f99c 100644 (file)
@@ -2381,8 +2381,6 @@ public:
   template<typename T, int MSGTYPE>
   bool can_discard_replica_op(OpRequestRef& op);
 
-  static bool op_must_wait_for_map(epoch_t cur_epoch, OpRequestRef& op);
-
   bool old_peering_msg(epoch_t reply_epoch, epoch_t query_epoch);
   bool old_peering_evt(CephPeeringEvtRef evt) {
     return old_peering_msg(evt->get_epoch_sent(), evt->get_epoch_requested());