summaryrefslogtreecommitdiffstats
path: root/api/src/glfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/glfs.c')
-rw-r--r--api/src/glfs.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/api/src/glfs.c b/api/src/glfs.c
index 9aa817b3f3e..8c6916d0d85 100644
--- a/api/src/glfs.c
+++ b/api/src/glfs.c
@@ -596,6 +596,24 @@ pub_glfs_setfsgroups (size_t size, const gid_t *list)
GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_setfsgroups, 3.4.2);
+int
+pub_glfs_setfsleaseid (leaseid_t leaseid)
+{
+ int ret = -1;
+ char *gleaseid = NULL;
+
+ GF_VALIDATE_OR_GOTO (THIS->name, leaseid, out);
+
+ gleaseid = glusterfs_leaseid_buf_get();
+ if (gleaseid) {
+ memcpy (gleaseid, leaseid, LEASE_ID_SIZE);
+ ret = 0;
+ }
+out:
+ return ret;
+}
+
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_setfsleaseid, 4.0.0);
struct glfs *
pub_glfs_from_glfd (struct glfs_fd *glfd)