]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: use same inode count in health check as in trim 14197/head
authorJohn Spray <john.spray@redhat.com>
Tue, 28 Mar 2017 15:17:00 +0000 (16:17 +0100)
committerJohn Spray <john.spray@redhat.com>
Thu, 13 Apr 2017 16:24:42 +0000 (12:24 -0400)
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 <john.spray@redhat.com>
src/mds/Beacon.cc

index 16977f50a129bb68f65d7d5e24f68abc1e567e96..602240bfe12c41db52128f5e56c70b9d47a21125 100644 (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";