From 513f6617bff85aa1aa3d15b1497ec4ebc2d53934 Mon Sep 17 00:00:00 2001 From: John Spray Date: Tue, 28 Mar 2017 16:17:00 +0100 Subject: [PATCH] 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 --- src/mds/Beacon.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mds/Beacon.cc b/src/mds/Beacon.cc index 16977f50a12..602240bfe12 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";