]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: initialize shardedwq osdmap references on startup 16535/head
authorSage Weil <sage@redhat.com>
Tue, 1 Aug 2017 13:58:28 +0000 (09:58 -0400)
committerSage Weil <sage@redhat.com>
Tue, 1 Aug 2017 13:58:28 +0000 (09:58 -0400)
The _process methods assumes the shard osdmap refs are
non-null, but that leaves a window between startup and
the first call to prune_pg_waiters (via consume_map()),
which can lead to a seg fault.

Calling prune during startup, before we have any work,
will initialize those references.

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

index 3e721e9bc9843cd6eb5ecd6328477ef214c6a94e..e6eb9325be20d9bccde1180381e709fb7b888188 100644 (file)
@@ -2515,6 +2515,9 @@ int OSD::init()
 
   clear_temp_objects();
 
+  // initialize osdmap references in sharded wq
+  op_shardedwq.prune_pg_waiters(osdmap, whoami);
+
   // load up pgs (as they previously existed)
   load_pgs();