From: Sage Weil Date: Fri, 22 Feb 2019 17:10:48 +0000 (-0600) Subject: osd: clean up oncommit contexts in _process shutdown X-Git-Tag: v14.1.1~108^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8dcb4d6842b14613940e6cab7b356f9dbbc84692;p=ceph.git osd: clean up oncommit contexts in _process shutdown If we have queued PG completions in the workqueue and have to shut down, delete them, so that the PG refs get cleaned up. Fixes: http://tracker.ceph.com/issues/38431 Signed-off-by: Sage Weil --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index bfd7b3bbb19..2b9830232a4 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -10694,6 +10694,10 @@ void OSD::ShardedOpWQ::_process(uint32_t thread_index, heartbeat_handle_d *hb) if (sdata->pqueue->empty()) { if (osd->is_stopping()) { sdata->shard_lock.unlock(); + for (auto c : oncommits) { + dout(10) << __func__ << " discarding in-flight oncommit " << c << dendl; + delete c; + } return; // OSD shutdown, discard. } sdata->shard_lock.unlock(); @@ -10704,6 +10708,10 @@ void OSD::ShardedOpWQ::_process(uint32_t thread_index, heartbeat_handle_d *hb) OpQueueItem item = sdata->pqueue->dequeue(); if (osd->is_stopping()) { sdata->shard_lock.unlock(); + for (auto c : oncommits) { + dout(10) << __func__ << " discarding in-flight oncommit " << c << dendl; + delete c; + } return; // OSD shutdown, discard. }