mirror of
https://github.com/ceph/ceph
synced 2025-01-19 17:41:39 +00:00
osd/PG: cancel local reservation in RemoteReservationRejected handler
We can get a RemoteReservationRejected event either because *we* decide to reject, or because we get a REJECT from the primary that means "cancel" (e.g., because recovery/backfill was preempted there). In both cases we want to cancel our remote_reservation. Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
57d18f0e8d
commit
f5809afb0f
@ -6522,7 +6522,6 @@ PG::RecoveryState::RepWaitBackfillReserved::react(const RemoteBackfillReserved &
|
||||
ldout(pg->cct, 10) << "backfill reservation rejected after reservation: "
|
||||
<< "failure injection" << dendl;
|
||||
pg->reject_reservation();
|
||||
pg->osd->remote_reserver.cancel_reservation(pg->info.pgid);
|
||||
post_event(RemoteReservationRejected());
|
||||
return discard_event();
|
||||
} else if (!pg->cct->_conf->osd_debug_skip_full_check_in_backfill_reservation &&
|
||||
@ -6530,7 +6529,6 @@ PG::RecoveryState::RepWaitBackfillReserved::react(const RemoteBackfillReserved &
|
||||
ldout(pg->cct, 10) << "backfill reservation rejected after reservation: "
|
||||
<< ss.str() << dendl;
|
||||
pg->reject_reservation();
|
||||
pg->osd->remote_reserver.cancel_reservation(pg->info.pgid);
|
||||
post_event(RemoteReservationRejected());
|
||||
return discard_event();
|
||||
} else {
|
||||
@ -6549,6 +6547,7 @@ boost::statechart::result
|
||||
PG::RecoveryState::RepWaitBackfillReserved::react(const RemoteReservationRejected &evt)
|
||||
{
|
||||
PG *pg = context< RecoveryMachine >().pg;
|
||||
pg->osd->remote_reserver.cancel_reservation(pg->info.pgid);
|
||||
return transit<RepNotRecovering>();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user