summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-transaction.c
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2012-04-23 19:58:41 +0530
committerVijay Bellur <vijay@gluster.com>2012-05-07 00:46:50 -0700
commitc5d9ac3477d295b5e97166ac655a52463a0d1fb8 (patch)
treec061c9bc4d12ad4ae07317d2490b18102b2852f3 /xlators/cluster/afr/src/afr-transaction.c
parent0caffe52b8db6670dfa2b1c825477ede7ba304c6 (diff)
cluster/afr: Perform Flush with lk-owner given by parent xlator.
Lk-owner of posix-lk and flush should be same, flush can't clear posix-lks without that lk-owner. Change-Id: If775abb5741a0beb00c419b54d023fbd429e3cb7 BUG: 810502 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3221 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-transaction.c')
-rw-r--r--xlators/cluster/afr/src/afr-transaction.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c
index c46ec6cf6..dedc0ba62 100644
--- a/xlators/cluster/afr/src/afr-transaction.c
+++ b/xlators/cluster/afr/src/afr-transaction.c
@@ -1214,6 +1214,11 @@ afr_internal_lock_finish (call_frame_t *frame, xlator_t *this)
priv = this->private;
local = frame->local;
+ /* Perform fops with the lk-owner from top xlator.
+ * Eg: lk-owner of posix-lk and flush should be same,
+ * flush cant clear the posix-lks without that lk-owner.
+ */
+ frame->root->lk_owner = local->transaction.main_frame->root->lk_owner;
if (__fop_changelog_needed (frame, this)) {
afr_changelog_pre_op (frame, this);
} else {