diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2012-02-23 15:43:58 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-03-17 23:31:38 -0700 |
commit | ca15758018b4da68da40c34f240de75b44cb49e9 (patch) | |
tree | 5bc73938a2d303940badfac5b918b6d177fcdfdc /xlators/cluster/afr/src/afr-transaction.c | |
parent | cba2f84cd084fdf005977690dce3c54fa9f8b133 (diff) |
cluster/afr: Enable eager-lock
Eager-lock is disabled by default.
Use cluster.eager-lock on/off to change the config.
write-behind on and eager-lock off is not supported configuration.
In afr, when eager-lock is enabled the inode lock on fd is taken
using the fd address as the lk-owner. So the lock is
interchangableale between the inode-locks on the same fd.
Change-Id: I7eef1ecd510f8028f5395dee882782da53c0de3f
BUG: 802515
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/2925
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-transaction.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-transaction.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c index 36e2812f968..584ad7aed23 100644 --- a/xlators/cluster/afr/src/afr-transaction.c +++ b/xlators/cluster/afr/src/afr-transaction.c @@ -1001,6 +1001,7 @@ afr_post_nonblocking_inodelk_cbk (call_frame_t *frame, xlator_t *this) gf_log (this->name, GF_LOG_DEBUG, "Non blocking inodelks failed. Proceeding to blocking"); int_lock->lock_cbk = afr_post_blocking_inodelk_cbk; + afr_set_lk_owner (frame, this, frame->root); afr_blocking_lock (frame, this); } else { @@ -1168,7 +1169,7 @@ afr_lock (call_frame_t *frame, xlator_t *this) frame->root->pid = (long) frame->root; - afr_set_lk_owner (frame, this); + afr_set_lk_owner (frame, this, frame->root); afr_set_lock_number (frame, this); |