From 7e72af7657973d508c179922bd29257ff8402bcd Mon Sep 17 00:00:00 2001 From: hari gowtham Date: Fri, 18 May 2018 15:05:37 +0530 Subject: Core: The lock contention on gf_client_dump_inodes_to_dict Problem: For a distributed replicated volume, in the inode status command the lock on gf_client_dump_inodes_to_dict is held by the first brickop. while this is being processed, if the second brickop comes. It fails to get the lock and the whole brick op fails. Fix: Instead of using a TRY_LOCK which errors out if the lock is busy, Use LOCK which will wait till the lock is acquired. Change-Id: I768a0a1b60f28c4f7f94549e18ee3765b69cc528 fixes: bz#1579769 Signed-off-by: hari gowtham --- libglusterfs/src/client_t.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/client_t.c b/libglusterfs/src/client_t.c index 4596db3470f..9068f192407 100644 --- a/libglusterfs/src/client_t.c +++ b/libglusterfs/src/client_t.c @@ -850,7 +850,7 @@ gf_client_dump_inodes_to_dict (xlator_t *this, dict_t *dict) if (!clienttable) return -1; - ret = TRY_LOCK (&clienttable->lock); + ret = LOCK (&clienttable->lock); { if (ret) { gf_msg ("client_t", GF_LOG_WARNING, 0, -- cgit