Skip to content

Commit

Permalink
Merge pull request ceph#6119 from athanatos/wip-13192
Browse files Browse the repository at this point in the history
Wip 13192

Reviewed-by: Sage Weil <[email protected]>
  • Loading branch information
liewegas committed Sep 30, 2015
2 parents b7d35d5 + 36e4a80 commit bc627ba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
3 changes: 0 additions & 3 deletions src/osd/HitSet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ HitSet::HitSet(const HitSet::Params& params)
impl.reset(new ExplicitObjectHitSet(static_cast<ExplicitObjectHitSet::Params*>(params.impl.get())));
break;

case TYPE_NONE:
break;

default:
assert (0 == "unknown HitSet type");
}
Expand Down
18 changes: 11 additions & 7 deletions src/osd/ReplicatedPG.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10785,15 +10785,19 @@ void ReplicatedPG::hit_set_clear()
void ReplicatedPG::hit_set_setup()
{
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) {
!is_primary()) {
hit_set_clear();
return;
}

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
if (is_primary() && is_peered()) {
hit_set_remove_all();
}
hit_set_remove_all();
return;
}

Expand Down

0 comments on commit bc627ba

Please sign in to comment.