summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/storage/posix/src/posix.c')
-rw-r--r--xlators/storage/posix/src/posix.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 8cce4be1c34..3a2fc13d2b1 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -5676,6 +5676,20 @@ out:
return 0;
}
+int32_t
+posix_lease (call_frame_t *frame, xlator_t *this,
+ loc_t *loc, struct gf_lease *lease, dict_t *xdata)
+{
+ struct gf_lease nullease = {0, };
+
+ gf_msg (this->name, GF_LOG_CRITICAL, EINVAL, P_MSG_LEASE_DISABLED,
+ "\"features/leases\" translator is not loaded. You need"
+ "to use it for proper functioning of your application");
+
+ STACK_UNWIND_STRICT (lease, frame, -1, ENOSYS, &nullease, NULL);
+ return 0;
+}
+
static int gf_posix_lk_log;
int32_t
@@ -7083,6 +7097,7 @@ struct xlator_fops fops = {
#ifdef HAVE_SEEK_HOLE
.seek = posix_seek,
#endif
+ .lease = posix_lease,
};
struct xlator_cbks cbks = {