summaryrefslogtreecommitdiffstats
path: root/glusterfsd
diff options
context:
space:
mode:
Diffstat (limited to 'glusterfsd')
-rw-r--r--glusterfsd/src/gf_attach.c35
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c2
2 files changed, 1 insertions, 36 deletions
diff --git a/glusterfsd/src/gf_attach.c b/glusterfsd/src/gf_attach.c
index 3f248292ddf..1c1106c06f6 100644
--- a/glusterfsd/src/gf_attach.c
+++ b/glusterfsd/src/gf_attach.c
@@ -37,39 +37,6 @@ struct rpc_clnt_program gf_attach_prog = {
.numproc = GLUSTERD_BRICK_MAXVALUE,
};
-/*
- * In a sane world, the generic RPC layer would be capable of tracking
- * connection status by itself, with no help from us. It might invoke our
- * callback if we had registered one, but only to provide information. Sadly,
- * we don't live in that world. Instead, the callback *must* exist and *must*
- * call rpc_clnt_{set,unset}_connected, because that's the only way those
- * fields get set (with RPC both above and below us on the stack). If we don't
- * do that, then rpc_clnt_submit doesn't think we're connected even when we
- * are. It calls the socket code to reconnect, but the socket code tracks this
- * stuff in a sane way so it knows we're connected and returns EINPROGRESS.
- * Then we're stuck, connected but unable to use the connection. To make it
- * work, we define and register this trivial callback.
- */
-int
-my_notify (struct rpc_clnt *rpc, void *mydata,
- rpc_clnt_event_t event, void *data)
-{
- switch (event) {
- case RPC_CLNT_CONNECT:
- printf ("connected\n");
- rpc_clnt_set_connected (&rpc->conn);
- break;
- case RPC_CLNT_DISCONNECT:
- printf ("disconnected\n");
- rpc_clnt_unset_connected (&rpc->conn);
- break;
- default:
- fprintf (stderr, "unknown RPC event\n");
- }
-
- return 0;
-}
-
int32_t
my_callback (struct rpc_req *req, struct iovec *iov, int count, void *frame)
{
@@ -232,7 +199,7 @@ done_parsing:
return EXIT_FAILURE;
}
- if (rpc_clnt_register_notify (rpc, my_notify, NULL) != 0) {
+ if (rpc_clnt_register_notify (rpc, NULL, NULL) != 0) {
fprintf (stderr, "rpc_clnt_register_notify failed\n");
return EXIT_FAILURE;
}
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index 5666a532696..863765d644f 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -2402,8 +2402,6 @@ mgmt_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event,
server->volfile_server);
break;
case RPC_CLNT_CONNECT:
- rpc_clnt_set_connected (&((struct rpc_clnt*)ctx->mgmt)->conn);
-
ret = glusterfs_volfile_fetch (ctx);
if (ret) {
emval = ret;