From 748138bc3001de6d29be50c9e72ec1b32cb20625 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 Backport of http://review.gluster.org/12739 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. BUG: 1285174 Change-Id: Id203a79896eaa093b035d645fe0fc24d7de71a3a Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/12740 Tested-by: NetBSD Build System Reviewed-by: Ravishankar N Tested-by: Gluster Build System --- xlators/cluster/afr/src/afr-dir-write.c | 1 + 1 file changed, 1 insertion(+) (limited to 'xlators') diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c index 2891f362298..3d586ddcc77 100644 --- a/xlators/cluster/afr/src/afr-dir-write.c +++ b/xlators/cluster/afr/src/afr-dir-write.c @@ -461,6 +461,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