summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorkarthik-us <ksubrahm@redhat.com>2018-12-10 18:13:19 +0530
committerkarthik-us <ksubrahm@redhat.com>2018-12-12 15:41:38 +0530
commit5c723ade196600030ee84621384cceb10fff64d8 (patch)
tree57eb9c35a452a5b7601d0afd210cfefaf5fab031 /xlators
parent3e3d83ee359c8bc8a8694865e0a8af869b2b8f33 (diff)
cluster/afr: Do not update read_subvol in inode_ctx after rename/link fop
Since rename/link fops on a file will not change any data in it, it should not update the read_subvol values in the inode_ctx, which interprets the data & metadata readable subvols for that file. The old read_subvol values should be retained even after the rename/link operations. Change-Id: I068044a426823a566f5bea8aa063cd689199d6dd fixes: bz#1657783 Signed-off-by: karthik-us <ksubrahm@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/afr/src/afr-dir-write.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c
index 119b74e5b10..ebfee94ae4c 100644
--- a/xlators/cluster/afr/src/afr-dir-write.c
+++ b/xlators/cluster/afr/src/afr-dir-write.c
@@ -98,7 +98,9 @@ __afr_dir_write_finalize(call_frame_t *frame, xlator_t *this)
}
if (local->inode) {
- afr_replies_interpret(frame, this, local->inode, NULL);
+ if (local->op != GF_FOP_RENAME && local->op != GF_FOP_LINK)
+ afr_replies_interpret(frame, this, local->inode, NULL);
+
inode_read_subvol = afr_data_subvol_get(local->inode, this, NULL, NULL,
NULL, &args);
}