From f325b7dbc708d54dfccf0a15918bd2b397b4c777 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 2 Jan 2018 21:37:30 -0600 Subject: [PATCH] osd: fast dispatch ping Signed-off-by: Sage Weil --- src/osd/OSD.cc | 12 +++++------- src/osd/OSD.h | 1 + 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 22918f92518..6453f710699 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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(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 diff --git a/src/osd/OSD.h b/src/osd/OSD.h index f48c61bafc9..f09bf4f15b4 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -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: -- 2.39.5