From: Yan, Zheng Date: Sun, 25 Jan 2015 14:00:02 +0000 (+0800) Subject: mds: remove MDSCacheObject::get_pin_totals() X-Git-Tag: v9.0.0~201^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ce3d79f5f37de796cb8d8c1085ae6d3d439f4f6f;p=ceph.git mds: remove MDSCacheObject::get_pin_totals() MDSCacheObject::get_pin_totals() is debug code of debug code, which is not quite useful. Signed-off-by: Yan, Zheng --- diff --git a/src/mds/mdstypes.h b/src/mds/mdstypes.h index 975f9004059..ca6f3efb936 100644 --- a/src/mds/mdstypes.h +++ b/src/mds/mdstypes.h @@ -1334,15 +1334,6 @@ protected: #endif return ref; } -#ifdef MDS_REF_SET - int get_pin_totals() { - int total = 0; - for(std::map::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& 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 }