}
void request_local_background_io_reservation(
unsigned priority,
- PGPeeringEventRef on_grant,
- PGPeeringEventRef on_preempt) final {
+ PGPeeringEventURef on_grant,
+ PGPeeringEventURef on_preempt) final {
shard_services.local_reserver.request_reservation(
pgid,
on_grant ? make_lambda_context([this, on_grant=std::move(on_grant)] (int) {
void PG::request_local_background_io_reservation(
unsigned priority,
- PGPeeringEventRef on_grant,
- PGPeeringEventRef on_preempt) {
+ PGPeeringEventURef on_grant,
+ PGPeeringEventURef on_preempt) {
osd->local_reserver.request_reservation(
pg_id,
on_grant ? new QueuePeeringEvt(
- this, on_grant) : nullptr,
+ this, std::move(on_grant)) : nullptr,
priority,
on_preempt ? new QueuePeeringEvt(
- this, on_preempt) : nullptr);
+ this, std::move(on_preempt)) : nullptr);
}
void PG::update_local_background_io_priority(
float delay) override;
void request_local_background_io_reservation(
unsigned priority,
- PGPeeringEventRef on_grant,
- PGPeeringEventRef on_preempt) override;
+ PGPeeringEventURef on_grant,
+ PGPeeringEventURef on_preempt) override;
void update_local_background_io_priority(
unsigned priority) override;
void cancel_local_background_io_reservation() override;
ps->state_set(PG_STATE_BACKFILL_WAIT);
pl->request_local_background_io_reservation(
ps->get_backfill_priority(),
- std::make_shared<PGPeeringEvent>(
+ std::make_unique<PGPeeringEvent>(
ps->get_osdmap_epoch(),
ps->get_osdmap_epoch(),
LocalBackfillReserved()),
- std::make_shared<PGPeeringEvent>(
+ std::make_unique<PGPeeringEvent>(
ps->get_osdmap_epoch(),
ps->get_osdmap_epoch(),
DeferBackfill(0.0)));
ps->state_set(PG_STATE_RECOVERY_WAIT);
pl->request_local_background_io_reservation(
ps->get_recovery_priority(),
- std::make_shared<PGPeeringEvent>(
+ std::make_unique<PGPeeringEvent>(
ps->get_osdmap_epoch(),
ps->get_osdmap_epoch(),
LocalRecoveryReserved()),
- std::make_shared<PGPeeringEvent>(
+ std::make_unique<PGPeeringEvent>(
ps->get_osdmap_epoch(),
ps->get_osdmap_epoch(),
DeferRecovery(0.0)));
pl->cancel_local_background_io_reservation();
pl->request_local_background_io_reservation(
context<ToDelete>().priority,
- std::make_shared<PGPeeringEvent>(
+ std::make_unique<PGPeeringEvent>(
ps->get_osdmap_epoch(),
ps->get_osdmap_epoch(),
DeleteReserved()),
- std::make_shared<PGPeeringEvent>(
+ std::make_unique<PGPeeringEvent>(
ps->get_osdmap_epoch(),
ps->get_osdmap_epoch(),
DeleteInterrupted()));
*/
virtual void request_local_background_io_reservation(
unsigned priority,
- PGPeeringEventRef on_grant,
- PGPeeringEventRef on_preempt) = 0;
+ PGPeeringEventURef on_grant,
+ PGPeeringEventURef on_preempt) = 0;
/// Modify pending local background reservation request priority
virtual void update_local_background_io_priority(
unsigned priority) = 0;