]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: remove MDSCacheObject::get_pin_totals()
authorYan, Zheng <zyan@redhat.com>
Sun, 25 Jan 2015 14:00:02 +0000 (22:00 +0800)
committerYan, Zheng <zyan@redhat.com>
Wed, 25 Feb 2015 12:51:20 +0000 (20:51 +0800)
MDSCacheObject::get_pin_totals() is debug code of debug code, which
is not quite useful.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/mds/mdstypes.h

index 975f90040598b849b038a823dfff8e8ed08b2ca5..ca6f3efb9363d452e2bed1d64f33bcfbf0e192f4 100644 (file)
@@ -1334,15 +1334,6 @@ protected:
 #endif
     return ref;
   }
-#ifdef MDS_REF_SET
-  int get_pin_totals() {
-    int total = 0;
-    for(std::map<int,int>::iterator i = ref_map.begin(); i != ref_map.end(); ++i) {
-      total += i->second;
-    }
-    return total;
-  }
-#endif
   virtual const char *pin_name(int by) const = 0;
   //bool is_pinned_by(int by) { return ref_set.count(by); }
   //multiset<int>& get_ref_set() { return ref_set; }
@@ -1366,7 +1357,6 @@ protected:
       ref--;
 #ifdef MDS_REF_SET
       ref_map[by]--;
-      assert(ref == get_pin_totals());
 #endif
       if (ref == 0)
        last_put();
@@ -1390,7 +1380,6 @@ protected:
     if (ref_map.find(by) == ref_map.end())
       ref_map[by] = 0;
     ref_map[by]++;
-    assert(ref == get_pin_totals());
 #endif
   }