From: Sage Weil Date: Wed, 13 Aug 2014 15:20:42 +0000 (-0700) Subject: osd: inline require_osd_up_peer X-Git-Tag: v0.84~11^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3d7e2b357acac9de239be0ea14da2e2b3e462164;p=ceph.git osd: inline require_osd_up_peer There is only one caller. Signed-off-by: Sage Weil --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index b00219b57a3a..5cfbf97cd5fd 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -6721,19 +6721,6 @@ bool OSD::require_same_peer_instance(OpRequestRef& op, OSDMapRef& map) return true; } -bool OSD::require_up_osd_peer(OpRequestRef& op, OSDMapRef& map, - epoch_t their_epoch) -{ - if (!require_self_aliveness(op, their_epoch)) { - return false; - } else if (!require_osd_peer(op)) { - return false; - } else if (map->get_epoch() >= their_epoch && - !require_same_peer_instance(op, map)) { - return false; - } - return true; -} /* * require that we have same (or newer) map, and that @@ -8070,8 +8057,13 @@ void OSD::handle_replica_op(OpRequestRef& op, OSDMapRef& osdmap) return; } - if (!require_up_osd_peer(op, osdmap, m->map_epoch)) + if (!require_self_aliveness(op, m->map_epoch)) return; + if (!require_osd_peer(op)) + return false; + if (map->get_epoch() >= m->map_epoch && + !require_same_peer_instance(op, osdmap)) + return false; // must be a rep op. assert(m->get_source().is_osd()); diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 14a4dde82727..952d1b800292 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -1821,8 +1821,6 @@ protected: * @pre op was sent by an OSD using the cluster messenger */ bool require_same_peer_instance(OpRequestRef& op, OSDMapRef& map); - bool require_up_osd_peer(OpRequestRef& Op, OSDMapRef& map, - epoch_t their_epoch); bool require_same_or_newer_map(OpRequestRef& op, epoch_t e);