]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: account for closing sessions in hit_session 37646/head
authorDan van der Ster <daniel.vanderster@cern.ch>
Tue, 13 Oct 2020 07:08:12 +0000 (09:08 +0200)
committerDan van der Ster <daniel.vanderster@cern.ch>
Tue, 13 Oct 2020 07:08:12 +0000 (09:08 +0200)
While stopping an mds we can reply to a request while all client
sessions are closing. We shouldn't assert in this case.

Fixes: https://tracker.ceph.com/issues/47833
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
src/mds/SessionMap.cc

index 167ca3efd0a88826df5f874fe5844239edf69afe..fe85968abb9685a1550ae639be8d5ec3550463da 100644 (file)
@@ -1025,7 +1025,8 @@ 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) +
-                      get_session_count_in_state(Session::STATE_STALE);
+                      get_session_count_in_state(Session::STATE_STALE) +
+                      get_session_count_in_state(Session::STATE_CLOSING);
   ceph_assert(sessions != 0);
 
   double total_load = total_load_avg.hit();