]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ReplicatedPG: take and drop read locks when doing backfill
authorGreg Farnum <greg@inktank.com>
Wed, 23 Oct 2013 18:28:45 +0000 (11:28 -0700)
committerSamuel Just <sam.just@inktank.com>
Sun, 27 Oct 2013 17:40:32 +0000 (10:40 -0700)
commit5eb836f23a7358a11fc395a74fb48dd1fa615ceb
tree2dfa4b0ee0f13df26fcb47501ba5149043e2ec06
parent058c74ab23992f21024e19f2a4b62571bbb9ac22
ReplicatedPG: take and drop read locks when doing backfill

All our interfaces are in place, so now we can actually take and
drop the locks.
1) Take locks in ReplicatedPG::recover_backfill. This is the entry
into the backfill code path, and covers all objects which are
added to backfills_in_flight (via prep_backfill_object_push()). If we
can't get the lock right away, we stop the backfill movement there
until we can do so.
2) Drop the locks in ReplicatedPG::on_peer_recover(), called when the
push is completed.
2b) Further drop the locks on all backfills_in_flight objects in
_clear_recovery_state(), for when we cancel peering.

Signed-off-by: Greg Farnum <greg@inktank.com>
src/osd/ReplicatedPG.cc