From 789803ce16409a1f9ce84c0f9a60e68bd630380e Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 25 Nov 2015 12:31:25 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/12739 Reviewed-by: Krutika Dhananjay Reviewed-by: Ravishankar N Tested-by: NetBSD Build System Tested-by: Gluster Build System --- xlators/cluster/afr/src/afr-dir-write.c | 1 + 1 file changed, 1 insertion(+) (limited to 'xlators/cluster/afr/src/afr-dir-write.c') diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c index 8f525bee7e1..3f4ad246992 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; -- cgit