]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: don't recover files after normal session close
authorYan, Zheng <zyan@redhat.com>
Sun, 16 Aug 2020 04:33:04 +0000 (12:33 +0800)
committerYan, Zheng <zyan@redhat.com>
Sun, 16 Aug 2020 04:35:27 +0000 (12:35 +0800)
when closing a session, client does not flush cap releases, but client
should have flushed all dirty caps.

Fixes: https://tracker.ceph.com/issues/46984
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/mds/Server.cc

index 77f2b561436bb14610a32a72a5f758c0176226aa..16119ca7925d8b89633f0e9d099e7ee624af82f3 100644 (file)
@@ -820,11 +820,12 @@ void Server::_session_logged(Session *session, uint64_t state_seq, bool open, ve
   } else if (session->is_closing() ||
             session->is_killing()) {
     // kill any lingering capabilities, leases, requests
+    bool killing = session->is_killing();
     while (!session->caps.empty()) {
       Capability *cap = session->caps.front();
       CInode *in = cap->get_inode();
       dout(20) << " killing capability " << ccap_string(cap->issued()) << " on " << *in << dendl;
-      mds->locker->remove_client_cap(in, cap, true);
+      mds->locker->remove_client_cap(in, cap, killing);
     }
     while (!session->leases.empty()) {
       ClientLease *r = session->leases.front();