]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/Journaler: wrap recover() completion in finisher
authorJohn Spray <john.spray@redhat.com>
Thu, 1 Dec 2016 19:10:35 +0000 (19:10 +0000)
committerJohn Spray <john.spray@redhat.com>
Wed, 8 Mar 2017 10:20:56 +0000 (10:20 +0000)
Otherwise, the callback will deadlock if it in turn
calls into any Journaler functions.  Don't care
about performance because we do this once at startup.

Signed-off-by: John Spray <john.spray@redhat.com>
src/osdc/Journaler.cc

index 22e5327c11c1db25097bf968b6afd303fff3224f..df92fd807d4c1318fe936e8bc6ee76c1f9b16fdc 100644 (file)
@@ -164,7 +164,7 @@ void Journaler::recover(Context *onread)
   assert(readonly);
 
   if (onread)
-    waitfor_recover.push_back(onread);
+    waitfor_recover.push_back(wrap_finisher(onread));
 
   if (state != STATE_UNDEF) {
     ldout(cct, 1) << "recover - already recovering" << dendl;