From: xie xingguo Date: Tue, 12 Feb 2019 04:07:42 +0000 (-0800) Subject: osd: Fix the problem by rechecking backfill status each time X-Git-Tag: v14.1.0~104^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=9111ac7177c48fb0e4a0017e5734477a92198d2a;p=ceph-ci.git osd: Fix the problem by rechecking backfill status each time a RemoteReservationRevoked message is received, so we can restart the backfill process in a more safe and less-likely raced way. Fixes: http://tracker.ceph.com/issues/38034 Signed-off-by: xie xingguo --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 737142dd103..0cafa2030c5 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -7414,7 +7414,12 @@ PG::RecoveryState::Backfilling::react(const RemoteReservationRevoked &) PG *pg = context< RecoveryMachine >().pg; pg->state_set(PG_STATE_BACKFILL_WAIT); cancel_backfill(); - return transit(); + if (pg->needs_backfill()) { + return transit(); + } else { + // raced with MOSDPGBackfill::OP_BACKFILL_FINISH, ignore + return discard_event(); + } } void PG::RecoveryState::Backfilling::exit()