mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
Merge pull request #6119 from athanatos/wip-13192
Wip 13192 Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
bc627ba8c2
@ -36,9 +36,6 @@ HitSet::HitSet(const HitSet::Params& params)
|
|||||||
impl.reset(new ExplicitObjectHitSet(static_cast<ExplicitObjectHitSet::Params*>(params.impl.get())));
|
impl.reset(new ExplicitObjectHitSet(static_cast<ExplicitObjectHitSet::Params*>(params.impl.get())));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TYPE_NONE:
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert (0 == "unknown HitSet type");
|
assert (0 == "unknown HitSet type");
|
||||||
}
|
}
|
||||||
|
@ -10785,15 +10785,19 @@ void ReplicatedPG::hit_set_clear()
|
|||||||
void ReplicatedPG::hit_set_setup()
|
void ReplicatedPG::hit_set_setup()
|
||||||
{
|
{
|
||||||
if (!is_active() ||
|
if (!is_active() ||
|
||||||
!is_primary() ||
|
!is_primary()) {
|
||||||
!pool.info.hit_set_count ||
|
|
||||||
!pool.info.hit_set_period ||
|
|
||||||
pool.info.hit_set_params.get_type() == HitSet::TYPE_NONE) {
|
|
||||||
hit_set_clear();
|
hit_set_clear();
|
||||||
// only primary is allowed to remove all the hit set objects
|
return;
|
||||||
if (is_primary() && is_peered()) {
|
|
||||||
hit_set_remove_all();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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)) {
|
||||||
|
hit_set_clear();
|
||||||
|
|
||||||
|
// only primary is allowed to remove all the hit set objects
|
||||||
|
hit_set_remove_all();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user