diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2015-11-25 12:31:25 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2015-11-26 02:01:01 -0800 |
commit | 748138bc3001de6d29be50c9e72ec1b32cb20625 (patch) | |
tree | 76c8655ad60d5e1dbdbefdcdd91e43b213eaea70 | |
parent | 4ebd70ce34d4d3825f850f118933069b9ea2924f (diff) |
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 <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/12740
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
-rw-r--r-- | xlators/cluster/afr/src/afr-dir-write.c | 1 |
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 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; |