From: Abhishek Lekshmanan Date: Wed, 2 Apr 2025 13:57:42 +0000 (+0200) Subject: cephfs: session tracker accounts for killing sessions X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bb52cb72abe9540affce713fa3078e9b0f59d65a;p=ceph.git cephfs: session tracker accounts for killing sessions Fixes: https://tracker.ceph.com/issues/70770 Signed-off-by: Abhishek Lekshmanan --- diff --git a/src/mds/SessionMap.cc b/src/mds/SessionMap.cc index b9d4ef8e08fb..0a473b3cbcf0 100644 --- a/src/mds/SessionMap.cc +++ b/src/mds/SessionMap.cc @@ -1091,9 +1091,11 @@ int Session::check_access(CInode *in, unsigned mask, // track total and per session load void SessionMap::hit_session(Session *session) { - uint64_t sessions = get_session_count_in_state(Session::STATE_OPEN) + + uint64_t sessions = get_session_count_in_state(Session::STATE_OPENING) + + get_session_count_in_state(Session::STATE_OPEN) + get_session_count_in_state(Session::STATE_STALE) + - get_session_count_in_state(Session::STATE_CLOSING); + get_session_count_in_state(Session::STATE_CLOSING) + + get_session_count_in_state(Session::STATE_KILLING); ceph_assert(sessions != 0); double total_load = total_load_avg.hit();