summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajesh Joseph <rjoseph@redhat.com>2014-01-21 01:02:20 -0800
committerGerrit Code Review <review@dev.gluster.org>2014-01-21 01:02:20 -0800
commit44be8c36ac764a652b8575b0e3115c0b88c1c50f (patch)
tree784d63174733633fd636bfaaf4e2d18ecb2308fc
parent24ee10659d4d1306fc75d371ad2816df4363e013 (diff)
parentb9ef2f7fed24af01c4590c6f90dec93ef21b9f0b (diff)
Merge "glusterd/vol-locks: Releasing vol-locks on receiving peer disconnect" into development
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 259b82a..a95989c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -4034,6 +4034,7 @@ __glusterd_peer_rpc_notify (struct rpc_clnt *rpc, void *mydata,
glusterd_peerinfo_t *peerinfo = NULL;
glusterd_peerctx_t *peerctx = NULL;
gf_boolean_t quorum_action = _gf_false;
+ glusterd_volinfo_t *volinfo = NULL;
peerctx = mydata;
if (!peerctx)
@@ -4061,6 +4062,19 @@ __glusterd_peer_rpc_notify (struct rpc_clnt *rpc, void *mydata,
gf_log (this->name, GF_LOG_DEBUG, "got RPC_CLNT_DISCONNECT %d",
peerinfo->state.state);
+ if (peerinfo->connected) {
+ list_for_each_entry (volinfo, &conf->volumes, vol_list) {
+ ret = glusterd_volume_unlock (volinfo->volname,
+ peerinfo->uuid);
+ if (ret)
+ gf_log (this->name, GF_LOG_TRACE,
+ "Lock not released for %s",
+ volinfo->volname);
+ }
+
+ ret = 0;
+ }
+
if ((peerinfo->quorum_contrib != QUORUM_DOWN) &&
(peerinfo->state.state == GD_FRIEND_STATE_BEFRIENDED)) {
peerinfo->quorum_contrib = QUORUM_DOWN;