We call these in on_activate and on_pool_change. In the former, we are
necessarily active. In the latter, we only want to do anything if we are
active (otherwise, it will be taken care of when we eventually do become
active).
Fixes: #7904
Signed-off-by: Samuel Just <sam.just@inktank.com>
void ReplicatedPG::hit_set_setup()
{
- if (!is_primary() ||
+ if (!is_active() ||
+ !is_primary() ||
!pool.info.hit_set_count ||
!pool.info.hit_set_period ||
pool.info.hit_set_params.get_type() == HitSet::TYPE_NONE) {
void ReplicatedPG::agent_setup()
{
assert(is_locked());
- if (!is_primary() ||
+ if (!is_active() ||
+ !is_primary() ||
pool.info.cache_mode == pg_pool_t::CACHEMODE_NONE ||
pool.info.tier_of < 0 ||
!get_osdmap()->have_pg_pool(pool.info.tier_of)) {