summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-dir-write.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-11-25 12:31:25 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2015-11-26 01:59:22 -0800
commit789803ce16409a1f9ce84c0f9a60e68bd630380e (patch)
tree1b068d9dcad860a93a8c1d2866c09d87795b27fb /xlators/cluster/afr/src/afr-dir-write.c
parent20588e53774f1f16e4e9e25481b785f02231c485 (diff)
cluster/afr: Remember flags sent by create fop
Problem: In create fop, afr doesn't remember the flags. When afr has to perform fixing of the fd that needs to be opened on other bricks because the brick was down at the time of create, the flags with which it needs to send open are not present. Fix: Remember the flags in the fd_ctx. Thanks to Nitya for showing us the problem in re-open with the flags. Change-Id: I8ce1eb50c35fc0722cfc25cb4b6d234ef56180e5 BUG: 1285173 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/12739 Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-dir-write.c')
-rw-r--r--xlators/cluster/afr/src/afr-dir-write.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c
index 8f525be..3f4ad24 100644
--- a/xlators/cluster/afr/src/afr-dir-write.c
+++ b/xlators/cluster/afr/src/afr-dir-write.c
@@ -456,6 +456,7 @@ afr_create (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
local->op = GF_FOP_CREATE;
local->cont.create.flags = flags;
+ local->fd_ctx->flags = flags;
local->cont.create.mode = mode;
local->cont.create.fd = fd_ref (fd);
local->umask = umask;