e7a346
From 331b648352fb0a2cce1ac671f24adf46b1b76b38 Mon Sep 17 00:00:00 2001
e7a346
From: Milind Changire <mchangir@redhat.com>
e7a346
Date: Tue, 23 Oct 2018 12:47:34 +0530
e7a346
Subject: [PATCH 405/406] glusterfsd: add missing UNLOCK
e7a346
e7a346
Reproducer steps: (by Sanju Rakonde)
e7a346
1. enable brick mux
e7a346
2. create 3 volumes
e7a346
3. start all the 3 volumes
e7a346
4. stop 1st volume, it will be success
e7a346
5. stop second volume, it will time out
e7a346
e7a346
Problem:
e7a346
Deadlock in glusterfs_handle_terminate() during volume stop of 2nd
e7a346
successive volume resulting in timeout at gluster CLI.
e7a346
e7a346
Solution:
e7a346
Add missing UNLOCK to xlator_mem_cleanup()
e7a346
e7a346
NOTE:
e7a346
Upstream code review by Kaushal Madappa has confirmed that the code is
e7a346
good at upstream. This needs to be a downstream only patch, however,
e7a346
this patch is not required at a rebase so will not be marking it as
e7a346
such.
e7a346
e7a346
Upstream patch: https://review.gluster.org/c/glusterfs/+/19734
e7a346
Downstream patch: https://code.engineering.redhat.com/gerrit/152908
e7a346
e7a346
BUG: 1641489
e7a346
Change-Id: I7281aa6f03edcb720f9eca3d274025166ff0b601
e7a346
Signed-off-by: Milind Changire <mchangir@redhat.com>
e7a346
Reviewed-on: https://code.engineering.redhat.com/gerrit/153643
e7a346
Tested-by: RHGS Build Bot <nigelb@redhat.com>
e7a346
Reviewed-by: Kaushal Madappa <kaushal@redhat.com>
e7a346
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
e7a346
---
e7a346
 glusterfsd/src/glusterfsd-mgmt.c | 1 +
e7a346
 1 file changed, 1 insertion(+)
e7a346
e7a346
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
e7a346
index e3fceeb..b952526 100644
e7a346
--- a/glusterfsd/src/glusterfsd-mgmt.c
e7a346
+++ b/glusterfsd/src/glusterfsd-mgmt.c
e7a346
@@ -278,6 +278,7 @@ xlator_mem_cleanup (xlator_t *this) {
e7a346
                                         break;
e7a346
                         }
e7a346
                 }
e7a346
+                UNLOCK (&ctx->volfile_lock);
e7a346
         }
e7a346
 }
e7a346
 
e7a346
-- 
e7a346
1.8.3.1
e7a346