]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
osd: fix _process handling for pg vs slot race
authorSage Weil <sage@redhat.com>
Mon, 30 Apr 2018 15:41:35 +0000 (10:41 -0500)
committerSage Weil <sage@redhat.com>
Mon, 30 Apr 2018 20:38:59 +0000 (15:38 -0500)
commit7dbcc772f6906f0ba720d0352d27b9dc84406161
tree9cf885f59c2977f03f75db901e2c671691cb7d56
parent049e9097a9fb0158a0a9cf52b1c04caa5b8c96a8
osd: fix _process handling for pg vs slot race

We could see the slot with a different PG than we expected if the old
PG was removed and a new one was instantiated in its place.  We can't
just pick up the new PG pointer, however, since it isn't locked.

Fix by retrying with the slot's new pg (possibly null!).  Move this check
below the other cases so that we know we are otherwise consistent with
the slot, since the next pass around we might get pg==null and skip the
to_process.empty() and requeue_seq checks entirely.

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