From: Sage Weil Date: Mon, 2 Aug 2010 19:57:36 +0000 (-0700) Subject: osd: avoid most of handle_osd_map if there are no new maps in message X-Git-Tag: v0.21.1~19 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4a7c3553a736832043d3ea4d5af1ef391008256d;p=ceph.git osd: avoid most of handle_osd_map if there are no new maps in message We don't want to take the time to flush things to disk and shut down all the worker threads if there is nothing new in the osdmap update (as is usually the case). Signed-off-by: Sage Weil --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index f6e9e0843a104..40f199f1253f5 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -2166,6 +2166,13 @@ void OSD::handle_osd_map(MOSDMap *m) state = STATE_ACTIVE; + // make sure there is something new, here, before we bother flushing the queues and such + if (m->get_last() <= osdmap->get_epoch()) { + dout(10) << " no new maps here, dropping" << dendl; + m->put(); + return; + } + // pause, requeue op queue //wait_for_no_ops();