]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: remove buggy [pool_]last_map_marked_full tracking
authorSage Weil <sage@redhat.com>
Wed, 23 Sep 2015 14:26:25 +0000 (10:26 -0400)
committerSage Weil <sage@redhat.com>
Thu, 24 Sep 2015 23:13:03 +0000 (19:13 -0400)
This is buggy (we reset the pool epoch each time it remains full instead
of only on the initial transition from non-full to full) and now unused.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/OSD.h

index 25343ed6a36fe2f41cd27e35e1eaadbe36d69f04..d954a1f8a2f34c4f1b119b157ed0af1c3586c565 100644 (file)
@@ -6198,7 +6198,6 @@ void OSD::handle_osd_map(MOSDMap *m)
   ObjectStore::Transaction &t = *_t;
 
   // store new maps: queue for disk and put in the osdmap cache
-  epoch_t last_marked_full = 0;
   epoch_t start = MAX(osdmap->get_epoch() + 1, first);
   for (epoch_t e = start; e <= last; e++) {
     map<epoch_t,bufferlist>::iterator p;
@@ -6209,9 +6208,6 @@ void OSD::handle_osd_map(MOSDMap *m)
       bufferlist& bl = p->second;
       
       o->decode(bl);
-      if (o->test_flag(CEPH_OSDMAP_FULL))
-       last_marked_full = e;
-      set_pool_last_map_marked_full(o, e);
 
       ghobject_t fulloid = get_osdmap_pobject_name(e);
       t.write(coll_t::meta(), fulloid, 0, bl.length(), bl);
@@ -6243,10 +6239,6 @@ void OSD::handle_osd_map(MOSDMap *m)
        assert(0 == "bad fsid");
       }
 
-      if (o->test_flag(CEPH_OSDMAP_FULL))
-       last_marked_full = e;
-      set_pool_last_map_marked_full(o, e);
-
       bufferlist fbl;
       o->encode(fbl, inc.encode_features | CEPH_FEATURE_RESERVED);
 
@@ -6315,9 +6307,6 @@ void OSD::handle_osd_map(MOSDMap *m)
     superblock.oldest_map = first;
   superblock.newest_map = last;
 
-  if (last_marked_full > superblock.last_map_marked_full)
-    superblock.last_map_marked_full = last_marked_full;
   map_lock.get_write();
 
   // advance through the new maps
@@ -8809,17 +8798,3 @@ void OSD::PeeringWQ::_dequeue(list<PG*> *out) {
   }
   in_use.insert(got.begin(), got.end());
 }
-
-void OSD::set_pool_last_map_marked_full(OSDMap *o, epoch_t &e)
-{
-  map<int64_t, epoch_t> &pool_last_map_marked_full = superblock.pool_last_map_marked_full;
-  for (map<int64_t, pg_pool_t>::const_iterator it = o->get_pools().begin();
-       it != o->get_pools().end(); ++it) {
-    bool exist = pool_last_map_marked_full.count(it->first);
-    if (it->second.has_flag(pg_pool_t::FLAG_FULL) && !exist)
-      pool_last_map_marked_full[it->first] = e;
-    if (it->second.has_flag(pg_pool_t::FLAG_FULL) &&
-      (exist && pool_last_map_marked_full.count(it->first) < e))
-       pool_last_map_marked_full[it->first] = e;
-    }
-}
index 539114861f3e79242134623dcc41843a32b985fa..4fa61d12e66b7b370fc4e925a78ecaf7c474f45f 100644 (file)
@@ -1817,8 +1817,7 @@ private:
   void handle_osd_map(class MOSDMap *m);
   void note_down_osd(int osd);
   void note_up_osd(int osd);
-  void set_pool_last_map_marked_full(OSDMap *o, epoch_t &e);
-  
+
   bool advance_pg(
     epoch_t advance_to, PG *pg,
     ThreadPool::TPHandle &handle,