From: Venky Shankar Date: Mon, 6 Aug 2018 07:20:35 +0000 (-0400) Subject: mds: add counter for tracking cap non-responding clients X-Git-Tag: v12.2.9~35^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=187b6e61d56bbd55087508eea1914afa7069f3e3;p=ceph.git mds: add counter for tracking cap non-responding clients Signed-off-by: Venky Shankar (cherry picked from commit 8f2de92712a98568b0d07a795f1158868caae550) Conflicts: src/mds/Server.cc src/mds/Server.h --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 167a11e98c4f..3f4a74e0a959 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -178,6 +178,9 @@ void Server::create_logger() plb.add_time_avg(l_mdss_req_renamesnap_latency, "req_renamesnap_latency", "Request type rename snapshot latency"); + plb.add_u64_counter(l_mdss_cap_revoke_eviction, "cap_revoke_eviction", + "Cap Revoke Client Eviction", "cre", PerfCountersBuilder::PRIO_INTERESTING); + plb.set_prio_default(PerfCountersBuilder::PRIO_DEBUGONLY); plb.add_u64_counter(l_mdss_dispatch_client_request, "dispatch_client_request", "Client requests dispatched"); @@ -817,8 +820,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); + } } } diff --git a/src/mds/Server.h b/src/mds/Server.h index 80b973ed619d..cd8a30820631 100644 --- a/src/mds/Server.h +++ b/src/mds/Server.h @@ -66,6 +66,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, };