]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: fast dispatch ping
authorSage Weil <sage@redhat.com>
Wed, 3 Jan 2018 03:37:30 +0000 (21:37 -0600)
committerSage Weil <sage@redhat.com>
Wed, 4 Apr 2018 13:26:48 +0000 (08:26 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/OSD.h

index 22918f9251851e9d441f027fae71e14894dda18e..6453f710699aa8f2969bcf101b0eafc22aaa8dc3 100644 (file)
@@ -6532,6 +6532,11 @@ void OSD::ms_fast_dispatch(Message *m)
 
   // peering event?
   switch (m->get_type()) {
+  case CEPH_MSG_PING:
+    dout(10) << "ping from " << m->get_source() << dendl;
+    m->put();
+    return;
+
   case MSG_OSD_PG_CREATE2:
     return handle_fast_pg_create(static_cast<MOSDPGCreate2*>(m));
   case MSG_OSD_PG_QUERY:
@@ -6752,13 +6757,6 @@ void OSD::_dispatch(Message *m)
   dout(20) << "_dispatch " << m << " " << *m << dendl;
 
   switch (m->get_type()) {
-
-    // -- don't need lock --
-  case CEPH_MSG_PING:
-    dout(10) << "ping from " << m->get_source() << dendl;
-    m->put();
-    break;
-
     // -- don't need OSDMap --
 
     // map and replication
index f48c61bafc9304701733466e5e4410843e0ba9da..f09bf4f15b4bc9a1c47fd1bc4f70fba4dc143efc 100644 (file)
@@ -2117,6 +2117,7 @@ private:
   bool ms_can_fast_dispatch_any() const override { return true; }
   bool ms_can_fast_dispatch(const Message *m) const override {
     switch (m->get_type()) {
+    case CEPH_MSG_PING:
     case CEPH_MSG_OSD_OP:
     case CEPH_MSG_OSD_BACKOFF:
     case MSG_OSD_PG_CREATE2: