]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD: use an OSDMapRef& and require the Session* in _share_map_incoming
authorGreg Farnum <greg@inktank.com>
Thu, 20 Mar 2014 22:50:35 +0000 (15:50 -0700)
committerGreg Farnum <greg@inktank.com>
Mon, 5 May 2014 22:29:18 +0000 (15:29 -0700)
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 <greg@inktank.com>
src/osd/OSD.cc
src/osd/OSD.h

index d86951efc4cadadc0b27f17d057cd2e4a346e8f7..24c2e877f3247e118a881321b2bc2f43790bd4b3 100644 (file)
@@ -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;
index 8d6982b2c9ec94ba92b5c907541a657b3e336818..2c0eb5ca55b54869203938ba4e1827864f78207d 100644 (file)
@@ -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());