]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: inline require_osd_up_peer
authorSage Weil <sage@redhat.com>
Wed, 13 Aug 2014 15:20:42 +0000 (08:20 -0700)
committerSage Weil <sage@redhat.com>
Wed, 13 Aug 2014 15:20:42 +0000 (08:20 -0700)
There is only one caller.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/OSD.h

index b00219b57a3aa8f23bf8a9d5d4876a622632ddcb..5cfbf97cd5fd1415820ef60ff69b783442f74f84 100644 (file)
@@ -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());
index 14a4dde82727ee781be98ebda43626bdae0e3182..952d1b8002925b2e9f0844d984a32dbcb50909b9 100644 (file)
@@ -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);