From 7a27810aecce6e014100dbbc3c7961d769082c1e Mon Sep 17 00:00:00 2001 From: vmallika Date: Mon, 24 Aug 2015 08:07:14 +0530 Subject: cli: on error invoke cli_cmd_broadcast_response function in separate thread There is a problem in current CLI framework CLI holds the lock when processing command. When processing quota list command, below sequence of steps executed in the same thread and causing deadlock 1) CLI holds the lock 2) Send rpc_clnt_submit request to quotad for quota usage 3) If quotad is down, rpc_clnt_submit invokes cbk function with error 4) cbk function cli_quotad_getlimit_cbk tries to hold lock to broadcast the results and hangs, because same thread has already holding the lock This patch fixes the problem by creating seperate thread for broadcasting the result Change-Id: I53be006eadf6aaf348083d9168535530d70a8ab3 BUG: 1242819 Signed-off-by: vmallika Reviewed-on: http://review.gluster.org/11990 Tested-by: Gluster Build System Tested-by: NetBSD Build System Reviewed-by: Krishnan Parthasarathi --- cli/src/cli.h | 1 + 1 file changed, 1 insertion(+) (limited to 'cli/src/cli.h') diff --git a/cli/src/cli.h b/cli/src/cli.h index 965ce3f9ee4..deadd2d0a5d 100644 --- a/cli/src/cli.h +++ b/cli/src/cli.h @@ -146,6 +146,7 @@ struct cli_local { xmlDocPtr doc; int vol_count; #endif + gf_lock_t lock; }; struct cli_volume_status { -- cgit