From: John Spray Date: Tue, 28 Mar 2017 15:17:00 +0000 (+0100) Subject: mds: use same inode count in health check as in trim X-Git-Tag: v12.0.2~4^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=513f6617bff85aa1aa3d15b1497ec4ebc2d53934;p=ceph.git mds: use same inode count in health check as in trim Otherwise we could have a strange situation in which trimming is working fine, but the health check thinks there's a problem. Fixes: http://tracker.ceph.com/issues/19395 Signed-off-by: John Spray --- diff --git a/src/mds/Beacon.cc b/src/mds/Beacon.cc index 16977f50a129..602240bfe12c 100644 --- a/src/mds/Beacon.cc +++ b/src/mds/Beacon.cc @@ -483,10 +483,10 @@ void Beacon::notify_health(MDSRank const *mds) } // Report if we have significantly exceeded our cache size limit - if (CInode::count() > + if (mds->mdcache->get_cache_size() > g_conf->mds_cache_size * g_conf->mds_health_cache_threshold) { std::ostringstream oss; - oss << "Too many inodes in cache (" << CInode::count() + oss << "Too many inodes in cache (" << mds->mdcache->get_cache_size() << "/" << g_conf->mds_cache_size << "), " << mds->mdcache->num_inodes_with_caps << " inodes in use by clients, " << mds->mdcache->get_num_strays() << " stray files";