Skip to content

Commit

Permalink
Merge pull request #9861 from songbaisen/a12
Browse files Browse the repository at this point in the history
 mon: remove the redundant min_last_epoch_clean judge in PGMap

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
  • Loading branch information
yuriw committed Jun 27, 2016
2 parents 356d96d + 7b03828 commit 641180f
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions src/mon/PGMap.cc
Expand Up @@ -206,20 +206,7 @@ void PGMap::apply_incremental(CephContext *cct, const Incremental& inc)
if (t == pg_stat.end()) {
ceph::unordered_map<pg_t,pg_stat_t>::value_type v(update_pg, update_stat);
pg_stat.insert(v);
// did we affect the min?
if (min_last_epoch_clean &&
update_stat.get_effective_last_epoch_clean() < min_last_epoch_clean)
min_last_epoch_clean = 0;
} else {
// did we (or might we) affect the min?
epoch_t lec = update_stat.get_effective_last_epoch_clean();
if (min_last_epoch_clean &&
(lec < min_last_epoch_clean || // we did
(lec > min_last_epoch_clean && // we might
t->second.get_effective_last_epoch_clean() == min_last_epoch_clean)
))
min_last_epoch_clean = 0;

stat_pg_sub(update_pg, t->second);
t->second = update_stat;
}
Expand All @@ -245,14 +232,6 @@ void PGMap::apply_incremental(CephContext *cct, const Incremental& inc)
map<int32_t,epoch_t>::const_iterator j = inc.get_osd_epochs().find(osd);
assert(j != inc.get_osd_epochs().end());

// will we potentially affect the min?
if (min_last_epoch_clean &&
(i == osd_epochs.end() ||
j->second < min_last_epoch_clean ||
(j->second > min_last_epoch_clean &&
i->second == min_last_epoch_clean)))
min_last_epoch_clean = 0;

if (i == osd_epochs.end())
osd_epochs.insert(*j);
else
Expand Down

0 comments on commit 641180f

Please sign in to comment.