From: Greg Farnum Date: Thu, 20 Mar 2014 22:50:35 +0000 (-0700) Subject: OSD: use an OSDMapRef& and require the Session* in _share_map_incoming X-Git-Tag: v0.81~57^2~24 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b2187ac93592e2d280829f7b24fd07cdc92ff371;p=ceph.git OSD: use an OSDMapRef& and require the Session* in _share_map_incoming You can pass in a NULL Session*, but both callers do that; and using an OSDMapRef& reduces shared_ptr copies. Signed-off-by: Greg Farnum --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index d86951efc4ca..24c2e877f324 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -4642,7 +4642,7 @@ bool OSD::_share_map_incoming( entity_name_t name, Connection *con, epoch_t epoch, - OSDMapRef osdmap, + OSDMapRef& osdmap, Session* session) { bool shared = false; diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 8d6982b2c9ec..2c0eb5ca55b5 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -1338,8 +1338,7 @@ private: void forget_peer_epoch(int p, epoch_t e); bool _share_map_incoming(entity_name_t name, Connection *con, epoch_t epoch, - OSDMapRef osdmap, - Session *session = 0); + OSDMapRef& osdmap, Session *session); void _share_map_outgoing(int peer, Connection *con, OSDMapRef map = OSDMapRef());