diff options
| author | Soumya Koduri <skoduri@redhat.com> | 2018-01-10 15:01:59 +0530 | 
|---|---|---|
| committer | Niels de Vos <ndevos@redhat.com> | 2018-01-26 12:33:42 +0000 | 
| commit | 1a519f4bf960c6aafecfb189e8ec8b153abcf6ce (patch) | |
| tree | c9f863b427ca03a1ba6321403314a3766b136abb /api/src/glfs-internal.h | |
| parent | cd66e4edae84033f426820e359927272ad4ae641 (diff) | |
gfapi : New APIs have been added to use lease feature in gluster
Following APIs glfs_h_lease(), glfs_lease() added, so that gfapi applications
can set and get lease which enables more efficient client side caching.
Updates: #350
Change-Id: Iede85be9af1d4df969b890d0937ed0afa4ca6596
Signed-off-by: Poornima G <pgurusid@redhat.com>
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Diffstat (limited to 'api/src/glfs-internal.h')
| -rw-r--r-- | api/src/glfs-internal.h | 13 | 
1 files changed, 8 insertions, 5 deletions
diff --git a/api/src/glfs-internal.h b/api/src/glfs-internal.h index 76b0e34f1bd..145509c3caf 100644 --- a/api/src/glfs-internal.h +++ b/api/src/glfs-internal.h @@ -222,6 +222,8 @@ struct glfs_fd {  	gf_dirent_t       *next;  	struct dirent     *readdirbuf;          gf_lkowner_t       lk_owner; +        glfs_leaseid_t     lease_id; /* Stores lease_id of client in glfd */ +        gf_lock_t          lock; /* lock taken before updating fd state */  };  /* glfs object handle introduced for the alternate gfapi implementation based @@ -460,6 +462,7 @@ glfs_unlock (struct glfs *fs)  struct glfs_fd *glfs_fd_new (struct glfs *fs);  void glfs_fd_bind (struct glfs_fd *glfd); +void glfd_set_state_bind (struct glfs_fd *glfd);  xlator_t *glfs_active_subvol (struct glfs *fs)          GFAPI_PRIVATE(glfs_active_subvol, 3.4.0); @@ -604,11 +607,11 @@ glfd_entry_next (struct glfs_fd *glfd, int plus);  void  gf_dirent_to_dirent (gf_dirent_t *gf_dirent, struct dirent *dirent); -/* - * Nobody needs this call at all yet except for the test script. - */ -int glfs_ipc (glfs_fd_t *fd, int cmd,  void *xd_in, void **xd_out) __THROW -        GFAPI_PRIVATE(glfs_ipc, 3.12.0); +void +gf_lease_to_glfs_lease (struct gf_lease *gf_lease, struct glfs_lease *lease); + +void +glfs_lease_to_gf_lease (struct glfs_lease *lease, struct gf_lease *gf_lease);  void glfs_release_upcall (void *ptr);  #endif /* !_GLFS_INTERNAL_H */  | 
