We aren't actually active between activate() and all_activated_committed().
We'd have to suspend agent_work during that period which seems like too much
complexity for too little work saved.
Fixes: #7904
Signed-off-by: Samuel Just <sam.just@inktank.com>
set_probe_targets(prior_set->probe);
}
-void PG::clear_primary_state(bool staying_primary)
+void PG::clear_primary_state()
{
dout(10) << "clear_primary_state" << dendl;
osd->recovery_wq.dequeue(this);
osd->snap_trim_wq.dequeue(this);
- if (!staying_primary)
- agent_clear();
+ agent_clear();
osd->remove_want_pg_temp(info.pgid.pgid);
}
// reset primary state?
if (was_old_primary || is_primary())
- clear_primary_state(was_old_primary && is_primary());
+ clear_primary_state();
// pg->on_*
void clear_publish_stats();
public:
- void clear_primary_state(bool stay_primary);
+ void clear_primary_state();
public:
bool is_actingbackfill(pg_shard_t osd) const {
osd->remote_reserver.cancel_reservation(info.pgid);
osd->local_reserver.cancel_reservation(info.pgid);
- if (is_primary())
- clear_primary_state(false); // Not staying primary
+ clear_primary_state();
cancel_recovery();
}