]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
fragtree: remove unused and broken verify()
authorJohn Spray <john.spray@inktank.com>
Tue, 6 May 2014 15:48:08 +0000 (16:48 +0100)
committerJohn Spray <john.spray@inktank.com>
Thu, 8 May 2014 12:28:55 +0000 (13:28 +0100)
This fn had a while(1) with no break: if anyone
had called it it would block forever.

Caught by clang's "function 'verify' could be declared
with attribute 'noreturn'" warning.

Signed-off-by: John Spray <john.spray@inktank.com>
src/include/frag.h

index 2cf6399ad8ef2fe1bd05a191a8c5e1314d83a084..569d18266efb0baa905aa052531caae98ab74399 100644 (file)
@@ -452,24 +452,6 @@ public:
     return true;
   }
 
-  // verify that we describe a legal partition of the namespace.
-  void verify() const {
-    std::map<frag_t,int32_t> copy;
-    std::list<frag_t> q;
-    q.push_back(frag_t());
-    
-    while (1) {
-      frag_t cur = q.front();
-      q.pop_front();
-      int b = get_split(cur);
-      if (!b) continue;
-      copy[cur] = b;
-      cur.split(b, q);
-    }
-    
-    assert(copy == _splits);   
-  }
-  
   // encoding
   void encode(bufferlist& bl) const {
     ::encode(_splits, bl);