]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osdc/Objecter: fix tick_event handling in shutdown vs tick race 2795/head
authorSage Weil <sage@redhat.com>
Fri, 24 Oct 2014 16:32:20 +0000 (09:32 -0700)
committerSage Weil <sage@redhat.com>
Fri, 24 Oct 2014 16:32:20 +0000 (09:32 -0700)
commitf76f83ce3fa4285e356d643d958a01a69554378d
treec9a5063a17fd5fed5a466f7bafeeb6a8f07c76cd
parent48484356bbeae5d4da29861712a48155a1782b15
osdc/Objecter: fix tick_event handling in shutdown vs tick race

If we fail to cancel the tick_event, we rely on tick() itself to clear
tick_event.  I'm not quite sure how we got this wrong in the previous
commit, but this boils down to two cases:

1) shutdown() successfully cancels the event and clears tick_event.  tick()
   never runs.  tick_event == NULL when we finish.
2) shutdown() fails to cancel the event because it has already started.  In
   this case tick itself is blocking (or about to block) waiting on the
   rlock.  When it does run it will clear tick_event itself, then see
   initiazed == 0 and exit without rescheduling.

Fixes: #9873
Signed-off-by: Sage Weil <sage@redhat.com>
src/osdc/Objecter.cc