]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
journal: possible race condition between flush and append callback 37850/head
authorJason Dillaman <dillaman@redhat.com>
Fri, 16 Oct 2020 15:25:39 +0000 (11:25 -0400)
committerNathan Cutler <ncutler@suse.com>
Tue, 27 Oct 2020 09:09:59 +0000 (10:09 +0100)
commit0eb6ffbe6641d6bcc796360e0ca3a5a30a231747
tree800cd9f0eef1b6a90a0cfeff3b5b412cb0f9473d
parentb6d6e254979727c5d5ae5386f42bf220a508269a
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>
(cherry picked from commit 458ab997fe77ea78803a34c6c9715225aa3413ba)
src/journal/ObjectRecorder.cc
src/journal/ObjectRecorder.h