From 592bf35c4b84df2693f3e113355d86316beaf26d Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Tue, 17 Dec 2013 01:12:05 +0530 Subject: glusterd: rebalance to ref volinfo before starting Backport of http://review.gluster.org/6522 Change-Id: Ib316897dcbd0748bfb3bfcda186b9fe30c07f80f BUG: 1038051 Signed-off-by: Krishnan Parthasarathi Reviewed-on: http://review.gluster.org/6570 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd-rebalance.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xlators/mgmt/glusterd/src/glusterd-rebalance.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c index da29aaf02..ae08dba6a 100644 --- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c +++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c @@ -164,6 +164,9 @@ __glusterd_defrag_notify (struct rpc_clnt *rpc, void *mydata, rpc->conn.trans->name); break; } + case RPC_CLNT_DESTROY: + glusterd_volinfo_unref (volinfo); + break; default: gf_log ("", GF_LOG_TRACE, "got some other RPC event %d", event); @@ -329,6 +332,7 @@ glusterd_rebalance_rpc_create (glusterd_volinfo_t *volinfo) goto out; } + glusterd_volinfo_ref (volinfo); synclock_unlock (&priv->big_lock); ret = glusterd_rpc_create (&defrag->rpc, options, glusterd_defrag_notify, volinfo); -- cgit