]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: handle pg delete vs merge race
authorSage Weil <sage@redhat.com>
Tue, 14 Aug 2018 17:15:52 +0000 (12:15 -0500)
committerSage Weil <sage@redhat.com>
Fri, 7 Sep 2018 17:09:42 +0000 (12:09 -0500)
commit93b62838298d9156d3b9229abb4e7f1567659651
tree8c368c81f0145198f9245dbebfb9fd5805812815
parentce53eb332931bee8b1528f9dbee96f5075db19db
osd: handle pg delete vs merge race

Deletion involves an awkward dance between the pg lock and shard locks,
while the merge prep and tracking is "shard down".  If the delete has
finished its work we may find that a merge has since been prepped.

Unwinding the merge tracking is nontrivial, especially because it might
involved a second PG, possibly even a fabricated placeholder one. Instead,
if we delete and find that a merge is coming, undo our deletion and let
things play out in the future map epoch.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/OSD.h
src/osd/PG.cc