From 5d1255c81b0513fc9e70a4c136b3c3a61a85aee1 Mon Sep 17 00:00:00 2001 From: Dhairya Parmar Date: Mon, 5 Feb 2024 19:00:31 +0530 Subject: [PATCH] client: add function to check if file handle exists 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 --- src/client/Client.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/client/Client.h b/src/client/Client.h index 712583aa0d3c5..84142f8e44e8d 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -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); -- 2.39.5