mirror of
https://github.com/ceph/ceph
synced 2025-01-20 10:01:45 +00:00
osd: allow BlessedContexts to finish synchronously
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>
This commit is contained in:
parent
df1c7308c9
commit
4df1645ee5
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user