]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: publish osdmap to OSDService before starting wq threads 21623/head
authorSage Weil <sage@redhat.com>
Tue, 24 Apr 2018 18:02:14 +0000 (13:02 -0500)
committerSage Weil <sage@redhat.com>
Tue, 24 Apr 2018 20:16:21 +0000 (15:16 -0500)
The worker threads may request the map from the service (notably,
advance_pg() does this).

Fixes: http://tracker.ceph.com/issues/21977
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc

index 9b8891e96ba308eb89b7e13a2bb7c848ae55b61f..734d1db7b47ad17313f66ac39b762489d3f0aa5d 100644 (file)
@@ -2606,6 +2606,11 @@ int OSD::init()
   monc->set_log_client(&log_client);
   update_log_config();
 
+  service.init();
+  service.publish_map(osdmap);
+  service.publish_superblock(superblock);
+  service.max_oldest_map = superblock.oldest_map;
+
   osd_op_tp.start();
   command_tp.start();
 
@@ -2619,11 +2624,6 @@ int OSD::init()
     tick_timer_without_osd_lock.add_event_after(cct->_conf->osd_heartbeat_interval, new C_Tick_WithoutOSDLock(this));
   }
 
-  service.init();
-  service.publish_map(osdmap);
-  service.publish_superblock(superblock);
-  service.max_oldest_map = superblock.oldest_map;
-
   osd_lock.Unlock();
 
   r = monc->authenticate();