]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
PG,ReplicatedPG: handle_watch_timeout must not write during scrub/degraded
authorSamuel Just <sam.just@inktank.com>
Wed, 12 Dec 2012 06:22:31 +0000 (22:22 -0800)
committerSamuel Just <sam.just@inktank.com>
Wed, 12 Dec 2012 23:30:00 +0000 (15:30 -0800)
commit047aecd90f1dbfb172f48f9d10b67e82b3a8ce15
tree7e72dbf2ecfb2449a0674c9128333188670cca0b
parent0dfe6c84f0a5a5a51a8976174bd1f6d9d3741b17
PG,ReplicatedPG: handle_watch_timeout must not write during scrub/degraded

Currently, handle_watch_timeout will gladly write to an object while
that object is degraded or is being scrubbed.  Now, we queue a
callback to be called on scrub completion or finish_degraded_object
to recall handle_watch_timeout.  The callback mechanism assumes that
the registered callbacks assume they will be called with the pg
lock -- and no other locks -- already held.

The callback will release the obc and pg refs unconditionally.  Thus,
we need to replace the unconnected_watchers pointer with NULL to
ensure that unregister_unconnected_watcher fails to cancel the
event and does not release the resources a second time.

Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/PG.cc
src/osd/PG.h
src/osd/ReplicatedPG.cc