summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client-rpc-fops.c
diff options
context:
space:
mode:
authorAnoop C S <anoopcs@redhat.com>2015-10-15 15:04:34 +0530
committerRaghavendra G <rgowdapp@redhat.com>2018-01-29 17:36:31 +0000
commit3e78ea991b213422fc423ff94994e1eb295569c7 (patch)
tree4eb9bfc9e9a60a816a59d1e0215ee560e30f118a /xlators/protocol/client/src/client-rpc-fops.c
parent596143a286079338c30c8abc4b862f8d6ddddb3a (diff)
protocol: Remove lock recovery logic from client and server
Change-Id: I27f5e1e34fe3eac96c7dd88e90753fb5d3d14550 BUG: 1272030 Signed-off-by: Anoop C S <anoopcs@redhat.com>
Diffstat (limited to 'xlators/protocol/client/src/client-rpc-fops.c')
-rw-r--r--xlators/protocol/client/src/client-rpc-fops.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c
index ead439eab7e..4279a32a054 100644
--- a/xlators/protocol/client/src/client-rpc-fops.c
+++ b/xlators/protocol/client/src/client-rpc-fops.c
@@ -363,7 +363,6 @@ client_add_fd_to_saved_fds (xlator_t *this, fd_t *fd, loc_t *loc, int32_t flags,
fdctx->remote_fd = remote_fd;
fdctx->flags = flags;
fdctx->lk_ctx = fd_lk_ctx_ref (fd->lk_ctx);
- fdctx->lk_heal_state = GF_LK_HEAL_DONE;
fdctx->reopen_done = client_default_reopen_done;
INIT_LIST_HEAD (&fdctx->sfd_pos);
@@ -2437,20 +2436,6 @@ client3_3_lk_cbk (struct rpc_req *req, struct iovec *iov, int count,
goto out;
}
- /* Save the lock to the client lock cache to be able
- to recover in the case of server reboot.*/
- /*
- temporarily
- if (local->cmd == F_SETLK || local->cmd == F_SETLKW) {
- ret = client_add_lock_for_recovery (local->fd, &lock,
- local->owner, local->cmd);
- if (ret < 0) {
- rsp.op_ret = -1;
- rsp.op_errno = -ret;
- }
- }
- */
-
out:
if ((rsp.op_ret == -1) &&
(EAGAIN != gf_error_to_errno (rsp.op_errno))) {
@@ -3277,7 +3262,6 @@ client3_3_release (call_frame_t *frame, xlator_t *this,
clnt_conf_t *conf = NULL;
clnt_fd_ctx_t *fdctx = NULL;
clnt_args_t *args = NULL;
- lk_heal_state_t lk_heal_state = GF_LK_HEAL_DONE;
gf_boolean_t destroy = _gf_false;
if (!this || !data)
@@ -3291,7 +3275,6 @@ client3_3_release (call_frame_t *frame, xlator_t *this,
pthread_spin_lock (&conf->fd_lock);
{
remote_fd = fdctx->remote_fd;
- lk_heal_state = fdctx->lk_heal_state;
/* fdctx->remote_fd == -1 indicates a reopen attempt
in progress. Just mark ->released = 1 and let
@@ -3299,7 +3282,7 @@ client3_3_release (call_frame_t *frame, xlator_t *this,
*/
if (remote_fd == -1) {
fdctx->released = 1;
- } else if (lk_heal_state == GF_LK_HEAL_DONE) {
+ } else {
list_del_init (&fdctx->sfd_pos);
destroy = _gf_true;
}