From: Sage Weil Date: Tue, 28 Feb 2017 02:14:57 +0000 (-0600) Subject: osd/PG: remove unused op_must_wait_for_map X-Git-Tag: v12.0.3~80^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0a8c3e409b90d3e5239763cd90bf7dbbb4e73370;p=ceph.git osd/PG: remove unused op_must_wait_for_map Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 4ebeeadc967e..983bd825de00 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -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(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(op->get_req())->map_epoch); - - case MSG_OSD_REPOP: - return !have_same_or_newer_map( - cur_epoch, - static_cast(op->get_req())->map_epoch); - - case MSG_OSD_SUBOPREPLY: - return !have_same_or_newer_map( - cur_epoch, - static_cast(op->get_req())->map_epoch); - - case MSG_OSD_REPOPREPLY: - return !have_same_or_newer_map( - cur_epoch, - static_cast(op->get_req())->map_epoch); - - case MSG_OSD_PG_SCAN: - return !have_same_or_newer_map( - cur_epoch, - static_cast(op->get_req())->map_epoch); - - case MSG_OSD_PG_BACKFILL: - return !have_same_or_newer_map( - cur_epoch, - static_cast(op->get_req())->map_epoch); - - case MSG_OSD_PG_BACKFILL_REMOVE: - return !have_same_or_newer_map( - cur_epoch, - static_cast(op->get_req())->map_epoch); - - case MSG_OSD_PG_PUSH: - return !have_same_or_newer_map( - cur_epoch, - static_cast(op->get_req())->map_epoch); - - case MSG_OSD_PG_PULL: - return !have_same_or_newer_map( - cur_epoch, - static_cast(op->get_req())->map_epoch); - - case MSG_OSD_PG_PUSH_REPLY: - return !have_same_or_newer_map( - cur_epoch, - static_cast(op->get_req())->map_epoch); - - case MSG_OSD_EC_WRITE: - return !have_same_or_newer_map( - cur_epoch, - static_cast(op->get_req())->map_epoch); - - case MSG_OSD_EC_WRITE_REPLY: - return !have_same_or_newer_map( - cur_epoch, - static_cast(op->get_req())->map_epoch); - - case MSG_OSD_EC_READ: - return !have_same_or_newer_map( - cur_epoch, - static_cast(op->get_req())->map_epoch); - - case MSG_OSD_EC_READ_REPLY: - return !have_same_or_newer_map( - cur_epoch, - static_cast(op->get_req())->map_epoch); - - case MSG_OSD_REP_SCRUB: - return !have_same_or_newer_map( - cur_epoch, - static_cast(op->get_req())->map_epoch); - - case MSG_OSD_SCRUB_RESERVE: - return !have_same_or_newer_map( - cur_epoch, - static_cast(op->get_req())->map_epoch); - - case MSG_OSD_REP_SCRUBMAP: - return !have_same_or_newer_map( - cur_epoch, - static_cast(op->get_req())->map_epoch); - - case MSG_OSD_PG_UPDATE_LOG_MISSING: - return !have_same_or_newer_map( - cur_epoch, - static_cast(op->get_req())->map_epoch); - - case MSG_OSD_PG_UPDATE_LOG_MISSING_REPLY: - return !have_same_or_newer_map( - cur_epoch, - static_cast(op->get_req())->map_epoch); - } - ceph_abort(); - return false; -} - void PG::take_waiters() { dout(10) << "take_waiters" << dendl; diff --git a/src/osd/PG.h b/src/osd/PG.h index ea96417d5f86..f3811d8aebd0 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -2381,8 +2381,6 @@ public: template 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());