path: root/xlators/cluster/afr/src/afr-dir-write.c
diff options
authorkarthik-us <>2018-12-10 18:13:19 +0530
committerkarthik-us <>2018-12-12 15:41:38 +0530
commit5c723ade196600030ee84621384cceb10fff64d8 (patch)
tree57eb9c35a452a5b7601d0afd210cfefaf5fab031 /xlators/cluster/afr/src/afr-dir-write.c
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 <>
Diffstat (limited to 'xlators/cluster/afr/src/afr-dir-write.c')
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 119b74e..ebfee94 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);