]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: allow BlessedContexts to finish synchronously
authorSage Weil <sage@redhat.com>
Fri, 6 Oct 2017 15:26:18 +0000 (10:26 -0500)
committerSage Weil <sage@redhat.com>
Mon, 11 Dec 2017 21:05:38 +0000 (15:05 -0600)
If bluestore chooses to it may try to call sync_finish() from the queueing
call chain (instead of finish() from a Finisher).  Allow it for several
Contexts in PG and PrimaryLogPG, including those used for the main IO
path.

We assume here that all Contexts that we bless can complete synchronously
by calling their normal finish() method.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PrimaryLogPG.cc

index c8bd28a86114028ae2a3b6fbf54cdf618a9e4d9c..44028fd3cf8eec31fc23e175ce24edcb789a9b95 100644 (file)
@@ -141,6 +141,11 @@ public:
       c.release()->complete(t);
     pg->unlock();
   }
+  bool sync_finish(T t) {
+    // we assume here all blessed/wrapped Contexts can complete synchronously.
+    c.release()->complete(t);
+    return true;
+  }
 };
 
 GenContext<ThreadPool::TPHandle&> *PrimaryLogPG::bless_gencontext(
@@ -164,6 +169,11 @@ public:
       c.release()->complete(r);
     pg->unlock();
   }
+  bool sync_finish(int r) {
+    // we assume here all blessed/wrapped Contexts can complete synchronously.
+    c.release()->complete(r);
+    return true;
+  }
 };