summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2009-11-13 07:53:06 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-11-13 09:33:17 -0800
commit5c9a8a92edbd011e4fd5ec8e5f77eb13d7d8b771 (patch)
tree6a2d57a3db90e57a0bafeae0451dd3025d5c95aa /xlators/protocol/client
parent410909f31704db212174dff874f71621c3cb0576 (diff)
protocol/client: preserve open/create flags in fdctx for reopening
Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
Diffstat (limited to 'xlators/protocol/client')
-rw-r--r--xlators/protocol/client/src/client-protocol.c6
-rw-r--r--xlators/protocol/client/src/client-protocol.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/xlators/protocol/client/src/client-protocol.c b/xlators/protocol/client/src/client-protocol.c
index 526260076..8af3922b6 100644
--- a/xlators/protocol/client/src/client-protocol.c
+++ b/xlators/protocol/client/src/client-protocol.c
@@ -660,6 +660,7 @@ client_create (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
local->fd = fd_ref (fd);
loc_copy (&local->loc, loc);
+ local->flags = flags;
frame->local = local;
@@ -729,6 +730,8 @@ client_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
local->fd = fd_ref (fd);
loc_copy (&local->loc, loc);
+ local->flags = flags;
+ local->wbflags = wbflags;
frame->local = local;
@@ -3951,6 +3954,7 @@ client_create_cbk (call_frame_t *frame, gf_hdr_common_t *hdr, size_t hdrlen,
fdctx->inode = inode_ref (fd->inode);
fdctx->ino = ino;
fdctx->gen = gen;
+ fdctx->flags = local->flags;
INIT_LIST_HEAD (&fdctx->sfd_pos);
@@ -4029,6 +4033,8 @@ client_open_cbk (call_frame_t *frame, gf_hdr_common_t *hdr, size_t hdrlen,
fdctx->inode = inode_ref (fd->inode);
fdctx->ino = ino;
fdctx->gen = gen;
+ fdctx->flags = local->flags;
+ fdctx->wbflags = local->wbflags;
INIT_LIST_HEAD (&fdctx->sfd_pos);
diff --git a/xlators/protocol/client/src/client-protocol.h b/xlators/protocol/client/src/client-protocol.h
index 8801d530b..273486902 100644
--- a/xlators/protocol/client/src/client-protocol.h
+++ b/xlators/protocol/client/src/client-protocol.h
@@ -111,6 +111,8 @@ typedef struct {
fd_t *fd;
gf_op_t op;
client_fd_ctx_t *fdctx;
+ uint32_t flags;
+ uint32_t wbflags;
} client_local_t;