diff options
author | Jason Dillaman <dillaman@redhat.com> | 2020-10-16 17:25:39 +0200 |
---|---|---|
committer | Jason Dillaman <dillaman@redhat.com> | 2020-10-16 17:29:54 +0200 |
commit | 458ab997fe77ea78803a34c6c9715225aa3413ba (patch) | |
tree | 6263b17659dffd8d3195475db7eb39be61814a18 /src/journal/ObjectRecorder.h | |
parent | Merge pull request #37687 from tchaikov/wip-crimson-errorator (diff) | |
download | ceph-458ab997fe77ea78803a34c6c9715225aa3413ba.tar.xz ceph-458ab997fe77ea78803a34c6c9715225aa3413ba.zip |
journal: possible race condition between flush and append callback
When notifying the journal recorder of an overflow or if the object
close request has completed due to no more in-flight IO, it was
possible for a race between a flush request and the processing of
an append completion to attempt to kick off duplicate notifications.
Since the overflowed and closed callbacks are properly protected from
duplicates, use a counter instead of a boolean to track possible
in-flight handler callbacks.
Fixes: https://tracker.ceph.com/issues/47880
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Diffstat (limited to 'src/journal/ObjectRecorder.h')
-rw-r--r-- | src/journal/ObjectRecorder.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal/ObjectRecorder.h b/src/journal/ObjectRecorder.h index 1b36d246612..7281879fcf7 100644 --- a/src/journal/ObjectRecorder.h +++ b/src/journal/ObjectRecorder.h @@ -143,7 +143,7 @@ private: bufferlist m_prefetch_bl; - bool m_in_flight_callbacks = false; + uint32_t m_in_flight_callbacks = 0; ceph::condition_variable m_in_flight_callbacks_cond; uint64_t m_in_flight_bytes = 0; |