From 9d9e67f7e7749141b6b616c34208386799a2dcc2 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Fri, 17 Jun 2011 06:10:19 +0000 Subject: rpc-transport/rdma: don't return '0' in case of un-initiated rdma_connect() needed to handle the re-configuration of the port in client protocol. If there is a successful 'connect()' after the query port, the remote-port value gets reset to '0'. In this case, if the connect() return 0 for already connected socket, the query_portmap will keep happening in a loop. Signed-off-by: Amar Tumballi Signed-off-by: Anand Avati BUG: 2258 (enhance gluster volume rebalance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2258 --- rpc/rpc-transport/rdma/src/rdma.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/rpc/rpc-transport/rdma/src/rdma.c b/rpc/rpc-transport/rdma/src/rdma.c index 633f57db5b3..c70c84a3260 100644 --- a/rpc/rpc-transport/rdma/src/rdma.c +++ b/rpc/rpc-transport/rdma/src/rdma.c @@ -331,6 +331,7 @@ __rdma_disconnect (rpc_transport_t *this) strerror (errno)); ret = -errno; priv->tcp_connected = 0; + priv->connected = 0; } } @@ -4516,10 +4517,6 @@ rdma_connect (struct rpc_transport *this, int port) struct sockaddr_storage sockaddr; socklen_t sockaddr_len = 0; - if (priv->connected) { - return 0; - } - if (dict_get (options, "non-blocking-io")) { char *nb_connect = data_to_str (dict_get (this->options, "non-blocking-io")); -- cgit