]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: requeue osdmaps on heartbeat connections for cluster connection
authorSage Weil <sage@inktank.com>
Fri, 25 Jan 2013 17:25:28 +0000 (09:25 -0800)
committerSage Weil <sage@inktank.com>
Tue, 5 Feb 2013 06:06:09 +0000 (22:06 -0800)
If we receive an OSDMap on the cluster connection, requeue it for the
cluster messenger, and process it there where we normally do.  This avoids
any concerns about locking and ordering rules.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 76705ace2e9767939aa9acf5d9257c800f838854)

src/osd/OSD.cc

index a125a64ced9a4fbfce3f78646859bee6c98b18ed..a8925b5b3d72d4dd4c99aa455fe176453a8309f4 100644 (file)
@@ -3224,6 +3224,14 @@ bool OSD::heartbeat_dispatch(Message *m)
     handle_osd_ping((MOSDPing*)m);
     break;
 
+  case CEPH_MSG_OSD_MAP:
+    {
+      Connection *self = cluster_messenger->get_loopback_connection();
+      cluster_messenger->send_message(m, self);
+      self->put();
+    }
+    break;
+
   default:
     return false;
   }