]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: fix backoff vs reset race 13235/head
authorSage Weil <sage@redhat.com>
Mon, 13 Feb 2017 23:02:39 +0000 (18:02 -0500)
committerSage Weil <sage@redhat.com>
Tue, 14 Feb 2017 04:03:53 +0000 (23:03 -0500)
commitb729e6288f1e914f3fa457916493f257e82b901f
tree1c98508d789d2d35ffddd6dba43023c5555e4de3
parent5e885cca2214d0b82d630222af82ceff303c8f60
osd: fix backoff vs reset race

In OSD::ms_handle_reset, we clear session->con before removing any
backoffs.  That means we have to check if con has been cleared after any
call to have_backoff, lest we race with ms_handle_reset and it removes the
backoffs but we don't realize our client session is disconnected.

Introduce a helper to do both these checks in a safe way, simplifying
callers while we're at it.

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