summaryrefslogtreecommitdiff
path: root/src/libcephfs.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcephfs.cc')
-rw-r--r--src/libcephfs.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libcephfs.cc b/src/libcephfs.cc
index 02cf0864972..c33f6284afc 100644
--- a/src/libcephfs.cc
+++ b/src/libcephfs.cc
@@ -802,3 +802,17 @@ extern "C" CephContext *ceph_get_mount_context(struct ceph_mount_info *cmount)
{
return cmount->get_ceph_context();
}
+
+extern "C" int ceph_debug_get_fd_caps(struct ceph_mount_info *cmount, int fd)
+{
+ if (!cmount->is_mounted())
+ return -ENOTCONN;
+ return cmount->get_client()->get_caps_issued(fd);
+}
+
+extern "C" int ceph_debug_get_file_caps(struct ceph_mount_info *cmount, const char *path)
+{
+ if (!cmount->is_mounted())
+ return -ENOTCONN;
+ return cmount->get_client()->get_caps_issued(path);
+}