]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: remove the redundant min_last_epoch_clean judge in PGMap 9861/head
authorZhang.Zezhu <zhang.zezhu@zte.com.cn>
Wed, 22 Jun 2016 08:26:21 +0000 (16:26 +0800)
committersongbaisen <song.baisen@zte.com.cn>
Thu, 23 Jun 2016 03:15:42 +0000 (11:15 +0800)
 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 <song.baisen@zte.com.cn>

src/mon/PGMap.cc

index 3064edf09149452f60907f237266b9c316783613..d47d9ceb2f0c16c7741cf87ea5ff744593db9b7f 100644 (file)
@@ -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;
     }
@@ -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