diff options
author | Soumya Koduri <skoduri@redhat.com> | 2017-09-22 16:43:39 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2017-10-31 07:53:50 +0000 |
commit | c0e77f643930499966554cd849a40580e4ff68f9 (patch) | |
tree | 5baf2c5b33da77b4567fd23a77d526ca890519b0 /api/src/glfs-handles.h | |
parent | 4216869c724cf19c12d63c0580de88e9427e6467 (diff) |
gfapi: Register/Unregister Upcall events' callback
Polling continuously for upcall events is not optimal.
Hence new APIs have been added to allow applications to
register and unregister upcall events it is interested in
along with callback function to be invoked in case of any
such upcalls sent by backend server.
@TODO: Make changes in upcall xlator so that events are
sent to only those clients which either registered callbacks
or started polling. Shall be addressed in separate patch.
Updates: #315
Change-Id: I40473fd5cf689172ff2d7bb2869756b7fd5bc761
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Diffstat (limited to 'api/src/glfs-handles.h')
-rw-r--r-- | api/src/glfs-handles.h | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/api/src/glfs-handles.h b/api/src/glfs-handles.h index 9583fab069a..211595933fc 100644 --- a/api/src/glfs-handles.h +++ b/api/src/glfs-handles.h @@ -102,49 +102,6 @@ __BEGIN_DECLS struct glfs_object; typedef struct glfs_object glfs_object_t; -/* - * Applications (currently NFS-Ganesha) can make use of this - * structure to read upcall notifications sent by server. - * - * On success, applications need to check for 'reason' to decide - * if any upcall event is received. - * - * Currently supported upcall_events - - * GFAPI_INODE_INVALIDATE - - * 'event_arg' - glfs_upcall_inode - * - * After processing the event, applications need to free 'event_arg' with - * glfs_free(). - * - * Also similar to I/Os, the application should ideally stop polling - * before calling glfs_fini(..). Hence making an assumption that - * 'fs' & ctx structures cannot be freed while in this routine. - */ -struct glfs_upcall; - -struct glfs* -glfs_upcall_get_fs (struct glfs_upcall *arg) __THROW - GFAPI_PUBLIC(glfs_upcall_get_fs, 3.7.16); - -enum glfs_upcall_reason { - GLFS_UPCALL_EVENT_NULL = 0, - GLFS_UPCALL_INODE_INVALIDATE, /* invalidate cache entry */ -}; - -enum glfs_upcall_reason -glfs_upcall_get_reason (struct glfs_upcall *arg) __THROW - GFAPI_PUBLIC(glfs_upcall_get_reason, 3.7.16); - - -/* - * After processing upcall event, glfs_free() should be called on the - * glfs_upcall. - */ -void* -glfs_upcall_get_event (struct glfs_upcall *arg) __THROW - GFAPI_PUBLIC(glfs_upcall_get_event, 3.7.16); - - /* Functions for getting details about the glfs_upcall_inode * * None of the pointers returned by the below functions should be free()'d, |