From 7b038286805b54601d56630ae5a190f0d7f781f8 Mon Sep 17 00:00:00 2001 From: "Zhang.Zezhu" Date: Wed, 22 Jun 2016 16:26:21 +0800 Subject: [PATCH] mon: remove the redundant min_last_epoch_clean judge in PGMap In the end of the apply_incremental function, no matter what happens the min_last_epoch_clean must be 0. Signed-off-by:song baisen --- src/mon/PGMap.cc | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index 3064edf09149..d47d9ceb2f0c 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -206,20 +206,7 @@ void PGMap::apply_incremental(CephContext *cct, const Incremental& inc) if (t == pg_stat.end()) { ceph::unordered_map::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; } @@ -245,14 +232,6 @@ void PGMap::apply_incremental(CephContext *cct, const Incremental& inc) map::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 -- 2.47.3