diff options
author | Poornima G <pgurusid@redhat.com> | 2015-07-09 15:31:30 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-04-21 04:32:12 -0700 |
commit | f8a6cd1d2715fc13f130b7c76d8aea75de8b5133 (patch) | |
tree | b1742dfdc5b7aa3f2b0f1ec4d39fa17272a05a92 /xlators/storage/posix/src/posix.c | |
parent | ba9c40ab4ee238bb6f5e6e275f339484690bc84e (diff) |
posix: Add lease() fop
Change-Id: I20007d7ff4536ae8180425c84a1aa7863a6f2447
BUG: 1319992
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/11598
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix.c')
-rw-r--r-- | xlators/storage/posix/src/posix.c | 15 |
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 = { |