]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: expose ceph_ll_register_callbacks via libcephfs
authorJeff Layton <jlayton@redhat.com>
Thu, 16 Apr 2020 16:19:59 +0000 (12:19 -0400)
committerNathan Cutler <ncutler@suse.com>
Thu, 4 Jun 2020 13:09:20 +0000 (15:09 +0200)
Allow applications based on libcephfs to register callbacks, like we
do for ceph-fuse.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit adcf12d6c329a3bd534e089bc0c8b42dfd3e4515)

src/include/cephfs/libcephfs.h
src/libcephfs.cc

index a1fc0a7e30aebb2a54c741fc6a771c9d2f757c4f..c1668769f3fc5b5f83ec66115b2a8ebdceee2ba3 100755 (executable)
@@ -1852,6 +1852,16 @@ int ceph_start_reclaim(struct ceph_mount_info *cmount,
  */
 void ceph_finish_reclaim(struct ceph_mount_info *cmount);
 
+/**
+ * Register a set of callbacks to be used with this cmount
+ * @param cmount the ceph mount handle on which the cb's should be registerd
+ * @param args   callback arguments to register with the cmount
+ *
+ * Any fields set to NULL will be ignored. There currently is no way to
+ * unregister these callbacks, so this is a one-way change.
+ */
+void ceph_ll_register_callbacks(struct ceph_mount_info *cmount,
+                               struct ceph_client_callback_args *args);
 #ifdef __cplusplus
 }
 #endif
index 160ff47a99b6ff92489dc7906705ba461ffdd4c3..66c066436d2e748918322efeb69ec010f13f98e5 100755 (executable)
@@ -1993,3 +1993,9 @@ extern "C" void ceph_finish_reclaim(class ceph_mount_info *cmount)
 {
   cmount->get_client()->finish_reclaim();
 }
+
+extern "C" void ceph_ll_register_callbacks(class ceph_mount_info *cmount,
+                                          struct ceph_client_callback_args *args)
+{
+  cmount->get_client()->ll_register_callbacks(args);
+}