diff options
| -rw-r--r-- | rpc/rpc-lib/src/rpc-clnt.c | 6 | ||||
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-conn-mgmt.c | 1 | ||||
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-nfs-svc.c | 20 | 
3 files changed, 14 insertions, 13 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c index 264a3120a46..db99484cb81 100644 --- a/rpc/rpc-lib/src/rpc-clnt.c +++ b/rpc/rpc-lib/src/rpc-clnt.c @@ -1108,6 +1108,11 @@ rpc_clnt_start (struct rpc_clnt *rpc)          conn = &rpc->conn; +        pthread_mutex_lock (&conn->lock); +        { +                rpc->disabled = 0; +        } +        pthread_mutex_unlock (&conn->lock);          rpc_clnt_reconnect (conn);          return 0; @@ -1758,6 +1763,7 @@ rpc_clnt_disconnect (struct rpc_clnt *rpc)          pthread_mutex_lock (&conn->lock);          { +                rpc->disabled = 1;                  if (conn->timer) {                          gf_timer_call_cancel (rpc->ctx, conn->timer);                          conn->timer = NULL; diff --git a/xlators/mgmt/glusterd/src/glusterd-conn-mgmt.c b/xlators/mgmt/glusterd/src/glusterd-conn-mgmt.c index da8c909a14b..fca9323a180 100644 --- a/xlators/mgmt/glusterd/src/glusterd-conn-mgmt.c +++ b/xlators/mgmt/glusterd/src/glusterd-conn-mgmt.c @@ -80,7 +80,6 @@ out:  int  glusterd_conn_term (glusterd_conn_t *conn)  { -        rpc_clnt_disable (conn->rpc);          rpc_clnt_unref (conn->rpc);          return 0;  } diff --git a/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c b/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c index 49b1b561701..cb08a208101 100644 --- a/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c +++ b/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c @@ -164,18 +164,15 @@ glusterd_nfssvc_manager (glusterd_svc_t *svc, void *data, int flags)  {          int                 ret     = -1; -        if (glusterd_are_all_volumes_stopped ()) { -                ret = svc->stop (svc, SIGKILL); - -        } else { -                ret = glusterd_nfssvc_create_volfile (); -                if (ret) -                        goto out; +        ret = svc->stop (svc, SIGKILL); +        if (ret) +                goto out; -                ret = svc->stop (svc, SIGKILL); -                if (ret) -                        goto out; +        ret = glusterd_nfssvc_create_volfile (); +        if (ret) +                goto out; +        if (glusterd_nfssvc_need_start ()) {                  ret = svc->start (svc, flags);                  if (ret)                          goto out; @@ -193,8 +190,7 @@ out:  int  glusterd_nfssvc_start (glusterd_svc_t *svc, int flags)  { -        if (glusterd_nfssvc_need_start ()) -                return glusterd_svc_start (svc, flags, NULL); +        return glusterd_svc_start (svc, flags, NULL);          return 0;  }  | 
