From: Greg Farnum Date: Fri, 4 Apr 2014 23:06:05 +0000 (-0700) Subject: OSD: _share_map_outgoing whenever sending a message to a peer X-Git-Tag: v0.67.8~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=23fed8fc427e7077c61f86168a42f61a5f73867d;p=ceph.git OSD: _share_map_outgoing whenever sending a message to a peer This ensures that they get new maps before an op which requires them (that they would then request from the monitor). Signed-off-by: Greg Farnum (cherry picked from commit 232ac1a52a322d163d8d8dbc4a7da4b6a9acb709) --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index bea378ba6f8..cceeeb7bb57 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -3589,7 +3589,10 @@ void OSDService::send_message_osd_cluster(int peer, Message *m, epoch_t from_epo m->put(); return; } - osd->cluster_messenger->send_message(m, next_osdmap->get_cluster_inst(peer)); + const entity_inst_t& peer_inst = next_osdmap->get_cluster_inst(peer); + Connection *peer_con = osd->cluster_messenger->get_connection(peer_inst).get(); + osd->_share_map_outgoing(peer, peer_con, next_osdmap); + osd->cluster_messenger->send_message(m, peer_inst); } ConnectionRef OSDService::get_con_osd_cluster(int peer, epoch_t from_epoch) diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 1bebc9ebf33..60547722fcb 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -271,7 +271,7 @@ public: void dequeue_pg(PG *pg, list *dequeued); // -- superblock -- - Mutex publish_lock, pre_publish_lock; + Mutex publish_lock, pre_publish_lock; // pre-publish orders before publish OSDSuperblock superblock; OSDSuperblock get_superblock() { Mutex::Locker l(publish_lock);