summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/protocol/client')
-rw-r--r--xlators/protocol/client/src/client-handshake.c1
-rw-r--r--xlators/protocol/client/src/client.h2
-rw-r--r--xlators/protocol/client/src/client3_1-fops.c11
3 files changed, 5 insertions, 9 deletions
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c
index d8ca8402109..3703f93b095 100644
--- a/xlators/protocol/client/src/client-handshake.c
+++ b/xlators/protocol/client/src/client-handshake.c
@@ -1188,6 +1188,7 @@ protocol_client_reopen (xlator_t *this, clnt_fd_ctx_t *fdctx)
memcpy (req.gfid, fdctx->gfid, 16);
req.flags = gf_flags_from_flags (fdctx->flags);
+ req.flags = req.flags & (~(O_TRUNC|O_CREAT|O_EXCL));
gf_log (frame->this->name, GF_LOG_DEBUG,
"attempting reopen on %s", local->loc.path);
diff --git a/xlators/protocol/client/src/client.h b/xlators/protocol/client/src/client.h
index ac999db5a16..9d8a818aa9f 100644
--- a/xlators/protocol/client/src/client.h
+++ b/xlators/protocol/client/src/client.h
@@ -119,7 +119,6 @@ typedef struct _client_fd_ctx {
char is_dir;
char released;
int32_t flags;
- int32_t wbflags;
fd_lk_ctx_t *lk_ctx;
pthread_mutex_t mutex;
lk_heal_state_t lk_heal_state;
@@ -145,7 +144,6 @@ typedef struct client_local {
fd_t *fd;
clnt_fd_ctx_t *fdctx;
uint32_t flags;
- uint32_t wbflags;
struct iobref *iobref;
client_posix_lock_t *client_lock;
diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c
index 76668724b5e..2356d1f8bc7 100644
--- a/xlators/protocol/client/src/client3_1-fops.c
+++ b/xlators/protocol/client/src/client3_1-fops.c
@@ -372,7 +372,7 @@ out:
int
client_add_fd_to_saved_fds (xlator_t *this, fd_t *fd, loc_t *loc, int32_t flags,
- int32_t wbflags, int64_t remote_fd, int is_dir)
+ int64_t remote_fd, int is_dir)
{
int ret = 0;
uuid_t gfid = {0};
@@ -397,7 +397,6 @@ client_add_fd_to_saved_fds (xlator_t *this, fd_t *fd, loc_t *loc, int32_t flags,
fdctx->is_dir = is_dir;
fdctx->remote_fd = remote_fd;
fdctx->flags = flags;
- fdctx->wbflags = wbflags;
fdctx->lk_ctx = fd_lk_ctx_ref (fd->lk_ctx);
fdctx->lk_heal_state = GF_LK_HEAL_DONE;
@@ -452,8 +451,7 @@ client3_1_open_cbk (struct rpc_req *req, struct iovec *iov, int count,
if (-1 != rsp.op_ret) {
ret = client_add_fd_to_saved_fds (frame->this, fd, &local->loc,
- local->flags, local->wbflags,
- rsp.fd, 0);
+ local->flags, rsp.fd, 0);
if (ret) {
rsp.op_ret = -1;
rsp.op_errno = -ret;
@@ -2067,8 +2065,7 @@ client3_1_create_cbk (struct rpc_req *req, struct iovec *iov, int count,
gf_stat_to_iatt (&rsp.postparent, &postparent);
uuid_copy (local->loc.gfid, stbuf.ia_gfid);
ret = client_add_fd_to_saved_fds (frame->this, fd, &local->loc,
- local->flags, 0,
- rsp.fd, 0);
+ local->flags, rsp.fd, 0);
if (ret) {
rsp.op_ret = -1;
rsp.op_errno = -ret;
@@ -2546,7 +2543,7 @@ client3_1_opendir_cbk (struct rpc_req *req, struct iovec *iov, int count,
if (-1 != rsp.op_ret) {
ret = client_add_fd_to_saved_fds (frame->this, fd, &local->loc,
- 0, 0, rsp.fd, 1);
+ 0, rsp.fd, 1);
if (ret) {
rsp.op_ret = -1;
rsp.op_errno = -ret;