diff options
author | Jason Dillaman <dillaman@redhat.com> | 2015-07-14 14:43:35 +0200 |
---|---|---|
committer | Jason Dillaman <dillaman@redhat.com> | 2015-11-06 02:42:42 +0100 |
commit | a51d9d8525a721fdc8d2e576cc816461b78af9a1 (patch) | |
tree | 104113a49b0921019b1b4a814c41ca84c53023e7 /src/journal/JournalRecorder.h | |
parent | journal: Journaler::stop_append should be async (diff) | |
download | ceph-a51d9d8525a721fdc8d2e576cc816461b78af9a1.tar.xz ceph-a51d9d8525a721fdc8d2e576cc816461b78af9a1.zip |
journal: complete flush context w/o holding locks
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Diffstat (limited to 'src/journal/JournalRecorder.h')
-rw-r--r-- | src/journal/JournalRecorder.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/journal/JournalRecorder.h b/src/journal/JournalRecorder.h index 186fe05c78a..4c3489fcb88 100644 --- a/src/journal/JournalRecorder.h +++ b/src/journal/JournalRecorder.h @@ -64,9 +64,13 @@ private: int ret_val; C_Flush(Context *_on_finish, size_t _pending_flushes) - : on_finish(_on_finish), pending_flushes(_pending_flushes), ret_val(0) { + : on_finish(_on_finish), pending_flushes(_pending_flushes + 1), + ret_val(0) { } + void unblock() { + complete(0); + } virtual void complete(int r) { if (r < 0 && ret_val == 0) { ret_val = r; |