]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: add counter for tracking cap non-responding clients
authorVenky Shankar <vshankar@redhat.com>
Mon, 6 Aug 2018 07:20:35 +0000 (03:20 -0400)
committerVenky Shankar <vshankar@redhat.com>
Tue, 21 Aug 2018 05:58:55 +0000 (01:58 -0400)
Signed-off-by: Venky Shankar <vshankar@redhat.com>
src/mds/Server.cc
src/mds/Server.h

index 21e59f263f998a148123008748fcb0a339e19faa..27252fa8364a3639189a15fc276902b1ef43f808 100644 (file)
@@ -107,6 +107,8 @@ void Server::create_logger()
   plb.add_u64_counter(l_mdss_handle_client_session,
                       "handle_client_session", "Client session messages", "hcs",
                       PerfCountersBuilder::PRIO_INTERESTING);
+  plb.add_u64_counter(l_mdss_cap_revoke_eviction, "cap_revoke_eviction",
+                      "Cap Revoke Client Eviction", "cre", PerfCountersBuilder::PRIO_INTERESTING);
 
   // fop latencies are useful
   plb.set_prio_default(PerfCountersBuilder::PRIO_USEFUL);
@@ -842,8 +844,12 @@ void Server::evict_cap_revoke_non_responders() {
             << client << dendl;
 
     std::stringstream ss;
-    mds->evict_client(client.v, false, g_conf()->mds_session_blacklist_on_evict,
-                      ss, nullptr);
+    bool evicted = mds->evict_client(client.v, false,
+                                     g_conf()->mds_session_blacklist_on_evict,
+                                     ss, nullptr);
+    if (evicted && logger) {
+      logger->inc(l_mdss_cap_revoke_eviction);
+    }
   }
 }
 
index 36bbbbbe51c1027e9483c5491ee9f8b38a4a4ae4..44521d7477deccaf77264382b1c93e32ea912022 100644 (file)
@@ -71,6 +71,7 @@ enum {
   l_mdss_req_setxattr_latency,
   l_mdss_req_symlink_latency,
   l_mdss_req_unlink_latency,
+  l_mdss_cap_revoke_eviction,
   l_mdss_last,
 };