|
|
d1681e |
From 149a69ffa4aadca1d4d495957e5e7fd068756f64 Mon Sep 17 00:00:00 2001
|
|
|
d1681e |
From: hari gowtham <hgowtham@redhat.com>
|
|
|
d1681e |
Date: Fri, 18 May 2018 15:05:37 +0530
|
|
|
d1681e |
Subject: [PATCH 291/305] Core: The lock contention on
|
|
|
d1681e |
gf_client_dump_inodes_to_dict
|
|
|
d1681e |
|
|
|
d1681e |
backport of:https://review.gluster.org/#/c/20035/
|
|
|
d1681e |
|
|
|
d1681e |
Problem: For a distributed replicated volume, in the inode status
|
|
|
d1681e |
command the lock on gf_client_dump_inodes_to_dict is held by the
|
|
|
d1681e |
first brickop. while this is being processed, if the second brickop
|
|
|
d1681e |
comes. It fails to get the lock and the whole brick op fails.
|
|
|
d1681e |
|
|
|
d1681e |
Fix: Instead of using a TRY_LOCK which errors out if the lock is busy,
|
|
|
d1681e |
Use LOCK which will wait till the lock is acquired.
|
|
|
d1681e |
|
|
|
d1681e |
>Change-Id: I768a0a1b60f28c4f7f94549e18ee3765b69cc528
|
|
|
d1681e |
>Signed-off-by: hari gowtham <hgowtham@redhat.com>
|
|
|
d1681e |
>BUG: 1559452
|
|
|
d1681e |
|
|
|
d1681e |
fixes: bz#1579769
|
|
|
d1681e |
Change-Id: I768a0a1b60f28c4f7f94549e18ee3765b69cc528
|
|
|
d1681e |
BUG: 1559452
|
|
|
d1681e |
Signed-off-by: hari gowtham <hgowtham@redhat.com>
|
|
|
d1681e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/140334
|
|
|
d1681e |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
d1681e |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
d1681e |
---
|
|
|
d1681e |
libglusterfs/src/client_t.c | 2 +-
|
|
|
d1681e |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
d1681e |
|
|
|
d1681e |
diff --git a/libglusterfs/src/client_t.c b/libglusterfs/src/client_t.c
|
|
|
d1681e |
index dc153cc..17e3026 100644
|
|
|
d1681e |
--- a/libglusterfs/src/client_t.c
|
|
|
d1681e |
+++ b/libglusterfs/src/client_t.c
|
|
|
d1681e |
@@ -849,7 +849,7 @@ gf_client_dump_inodes_to_dict (xlator_t *this, dict_t *dict)
|
|
|
d1681e |
if (!clienttable)
|
|
|
d1681e |
return -1;
|
|
|
d1681e |
|
|
|
d1681e |
- ret = TRY_LOCK (&clienttable->lock);
|
|
|
d1681e |
+ ret = LOCK (&clienttable->lock);
|
|
|
d1681e |
{
|
|
|
d1681e |
if (ret) {
|
|
|
d1681e |
gf_msg ("client_t", GF_LOG_WARNING, 0,
|
|
|
d1681e |
--
|
|
|
d1681e |
1.8.3.1
|
|
|
d1681e |
|