]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kraken: osd: unlock sdata_op_ordering_lock with sdata_lock hold to avoid missing... 15962/head
authorAlexey Sheplyakov <asheplyakov@mirantis.com>
Tue, 27 Jun 2017 12:07:01 +0000 (16:07 +0400)
committerAlexey Sheplyakov <asheplyakov@mirantis.com>
Wed, 28 Jun 2017 04:57:32 +0000 (08:57 +0400)
Based on commit bc683385819146f3f6f096ceec97e1226a3cd237. The OSD code has
been refactored a lot since Kraken, hence cherry-picking that patch introduces
a lot of unrelated changes, and is much more difficult than reusing the idea.

Fixes: http://tracker.ceph.com/issues/20443
Signed-off-by: Alexey Sheplyakov <asheplyakov@mirantis.com>
src/osd/OSD.cc

index 134b141f54200e4c3632140651b48ae57485b5ba..4f94cca55efe77c6d89a5285838b238a9a1562a0 100644 (file)
@@ -8892,10 +8892,10 @@ void OSD::ShardedOpWQ::_process(uint32_t thread_index, heartbeat_handle_d *hb )
   assert(NULL != sdata);
   sdata->sdata_op_ordering_lock.Lock();
   if (sdata->pqueue->empty()) {
-    sdata->sdata_op_ordering_lock.Unlock();
     osd->cct->get_heartbeat_map()->reset_timeout(hb,
       osd->cct->_conf->threadpool_default_timeout, 0);
     sdata->sdata_lock.Lock();
+    sdata->sdata_op_ordering_lock.Unlock();
     sdata->sdata_cond.WaitInterval(sdata->sdata_lock,
       utime_t(osd->cct->_conf->threadpool_empty_queue_max_wait, 0));
     sdata->sdata_lock.Unlock();