]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: add function to check if file handle exists
authorDhairya Parmar <dparmar@redhat.com>
Mon, 5 Feb 2024 13:30:31 +0000 (19:00 +0530)
committerDhairya Parmar <dparmar@redhat.com>
Tue, 20 Feb 2024 12:08:20 +0000 (17:38 +0530)
It is named _ll_fh_exists meaning it is a helper func
only to be used with low level APIs.

Fixes: https://tracker.ceph.com/issues/64313
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
src/client/Client.h

index 712583aa0d3c5d7c137286df26a5e938706e06b5..84142f8e44e8d5617791914de7c55a950a91d1ed 100644 (file)
@@ -1026,6 +1026,9 @@ protected:
     return it->second;
   }
   int get_fd_inode(int fd, InodeRef *in);
+  bool _ll_fh_exists(Fh *f) {
+    return ll_unclosed_fh_set.count(f);
+  }
 
   // helpers
   void wake_up_session_caps(MetaSession *s, bool reconnect);