From 63918789fbb5f3a2d381e0f960f2dcbaf1b7ff72 Mon Sep 17 00:00:00 2001 From: Poornima G Date: Thu, 9 Jul 2015 15:06:49 +0530 Subject: core: add lease fop Change-Id: Ia27d66b1061b0377857827515590eb89b18515c9 BUG: 1319992 Signed-off-by: Poornima G Reviewed-on: http://review.gluster.org/11596 NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Smoke: Gluster Build System Reviewed-by: Rajesh Joseph Reviewed-by: Raghavendra Talur Reviewed-by: Pranith Kumar Karampuri --- libglusterfs/src/defaults.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'libglusterfs/src/defaults.h') diff --git a/libglusterfs/src/defaults.h b/libglusterfs/src/defaults.h index 16790eb6af6..148dc84b1c5 100644 --- a/libglusterfs/src/defaults.h +++ b/libglusterfs/src/defaults.h @@ -43,6 +43,7 @@ typedef struct { off_t offset; /* seek hole/data */ int valid; /* If the response is valid or not. For call-stub it is always valid irrespective of this */ + struct gf_lease lease; } default_args_cbk_t; typedef struct { @@ -74,6 +75,7 @@ typedef struct { struct iatt stat; gf_seek_what_t what; dict_t *xdata; + struct gf_lease lease; } default_args_t; int32_t default_notify (xlator_t *this, @@ -323,6 +325,9 @@ int32_t default_ipc (call_frame_t *frame, xlator_t *this, int32_t op, int32_t default_seek (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset, gf_seek_what_t what, dict_t *xdata); +int32_t default_lease (call_frame_t *frame, xlator_t *this, loc_t *loc, + struct gf_lease *lease, dict_t *xdata); + /* Resume */ int32_t default_getspec_resume (call_frame_t *frame, @@ -558,6 +563,8 @@ int32_t default_ipc_resume (call_frame_t *frame, xlator_t *this, int32_t default_seek_resume (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset, gf_seek_what_t what, dict_t *xdata); +int32_t default_lease_resume (call_frame_t *frame, xlator_t *this, loc_t *loc, + struct gf_lease *lease, dict_t *xdata); /* _cbk_resume */ @@ -830,6 +837,11 @@ default_getspec_cbk_resume (call_frame_t * frame, void *cookie, xlator_t * this, int32_t op_ret, int32_t op_errno, char *spec_data); +int32_t +default_lease_cbk_resume (call_frame_t *frame, void *cookie, xlator_t *this, + int32_t op_ret, int32_t op_errno, + struct gf_lease *lease, dict_t *xdata); + /* _CBK */ int32_t default_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, @@ -1062,6 +1074,11 @@ int32_t default_getspec_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, char *spec_data); +int32_t +default_lease_cbk (call_frame_t *frame, void *cookie, xlator_t *this, + int32_t op_ret, int32_t op_errno, + struct gf_lease *lease, dict_t *xdata); + int32_t default_lookup_failure_cbk (call_frame_t *frame, int32_t op_errno); @@ -1202,6 +1219,9 @@ default_getspec_failure_cbk (call_frame_t *frame, int32_t op_errno); int32_t default_seek_failure_cbk (call_frame_t *frame, int32_t op_errno); +int32_t +default_lease_failure_cbk (call_frame_t *frame, int32_t op_errno); + int32_t default_mem_acct_init (xlator_t *this); #endif /* _DEFAULTS_H */ -- cgit