From 9111ac7177c48fb0e4a0017e5734477a92198d2a Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Mon, 11 Feb 2019 20:07:42 -0800 Subject: [PATCH] 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 --- src/osd/PG.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 737142dd103b2..0cafa2030c5dc 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() -- 2.39.5