]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: fix race in do_recovery()
authorSage Weil <sage@inktank.com>
Mon, 7 Jan 2013 04:43:21 +0000 (20:43 -0800)
committerSamuel Just <sam.just@inktank.com>
Mon, 7 Jan 2013 18:39:21 +0000 (10:39 -0800)
commit213e3559dd260a2e19324f2a671c808261249f96
tree2f759830d281056c56effe2e56ec7047093aab3d
parente410d1a066b906cad3103a5bbfa5b4509be9ac37
osd: fix race in do_recovery()

Verify that the PG is still RECOVERING or BACKFILL when we take the pg
lock in the recovery thread.  This prevents a crash from an invalid
state machine event when the recovery queue races with a PG state change
(e.g., due to peering).

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
src/osd/OSD.cc
src/osd/PG.cc