summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server-protocol.c
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@zresearch.com>2009-04-03 06:30:54 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-03 19:09:35 +0530
commit6eb419f1ca68f536a700e63c1521e428560a0d9d (patch)
tree571e5bb852d90b94ddab0bcc5a7deaf26630c2a0 /xlators/protocol/server/src/server-protocol.c
parentd3d7245970189629937f6330a6d946f5fbb454af (diff)
server-protocol - reimplement connection cleanup to happen in 2 phases
- first phase, which happens when POLLERR is received on transport, releases all locks, flushes all open fds. - second phase, which happens when both the transports of connection destroyed, destroys the containers like lock table, fd table along with the connection. - the first phase, clears up any references to transport held by translators like posix-locks(in the form of blocked locks) paving way for the second phase. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/protocol/server/src/server-protocol.c')
-rw-r--r--xlators/protocol/server/src/server-protocol.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/xlators/protocol/server/src/server-protocol.c b/xlators/protocol/server/src/server-protocol.c
index 1153a5451..5eee27b92 100644
--- a/xlators/protocol/server/src/server-protocol.c
+++ b/xlators/protocol/server/src/server-protocol.c
@@ -4286,27 +4286,15 @@ server_release (call_frame_t *frame, xlator_t *bound_xl,
state = CALL_STATE(frame);
state->fd_no = ntoh64 (req->fd);
- state->fd = gf_fd_fdptr_get (conn->fdtable,
- state->fd_no);
-
- GF_VALIDATE_OR_GOTO(bound_xl->name, state->fd, fail);
gf_fd_put (conn->fdtable,
state->fd_no);
gf_log (bound_xl->name, GF_LOG_DEBUG,
- "%"PRId64": RELEASE \'fd=%"PRId64" (%"PRId64")\'",
- frame->root->unique, state->fd_no, state->fd->inode->ino);
+ "%"PRId64": RELEASE \'fd=%"PRId64"\'",
+ frame->root->unique, state->fd_no);
- STACK_WIND (frame,
- server_release_cbk,
- BOUND_XL(frame),
- BOUND_XL(frame)->fops->flush,
- state->fd);
- return 0;
-fail:
- server_release_cbk (frame, NULL, frame->this,
- -1, EINVAL);
+ server_release_cbk (frame, NULL, frame->this, 0, 0);
return 0;
}
@@ -8269,6 +8257,7 @@ notify (xlator_t *this, int32_t event, void *data, ...)
ret = -1;
transport_disconnect (trans);
+ server_connection_cleanup (this, trans->xl_private);
}
break;