Merge pull request #14197 from jcsp/wip-19395-counter

mds: use same inode count in health check as in trim

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
John Spray 2017-04-20 09:40:37 +01:00 committed by GitHub
commit 9264e1c85d

View File

@ -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";