]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
osd: pg: be more careful with locking around forced pg recovery
authorGreg Farnum <gfarnum@redhat.com>
Tue, 1 Aug 2017 02:52:42 +0000 (19:52 -0700)
committerGreg Farnum <gfarnum@redhat.com>
Tue, 1 Aug 2017 06:41:08 +0000 (23:41 -0700)
commitf19a3d96a337276d35587e33c3992165da4636e6
treeaa695e6c13e4bf3cbc4a08abf992748fecfad72b
parent3d86277b2ed8a55d68577165d5d4624d42e20420
osd: pg: be more careful with locking around forced pg recovery

This does several little things that add up to big concurrency and safety
improvements:
* Switch to passing around PGRefs instead of raw pointers, which is
  generally a good idea
* drop the pg_map_lock once we're done looking up the PGRefs, since
  we don't need it and holding the PG pointer alive was the only previous
  thing that might have made it necessary
* don't hold the recovery_lock since we don't need any OSD-level
  synchronization
* make sure the PG is not being deleted before we do a force-change of its
  state

Fixes: http://tracker.ceph.com/issues/20808
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
src/osd/OSD.cc
src/osd/OSD.h
src/osd/PG.cc
src/osd/PG.h