summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-syncop.c
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2019-06-24 12:00:20 +0530
committerRinku Kothiya <rkothiya@redhat.com>2019-07-24 10:29:17 +0000
commit47fcbc4c055a7880d2926e918ae1e1f57c7db20d (patch)
tree6e2576a1d904aef082229ace4714c99c539428df /xlators/mgmt/glusterd/src/glusterd-syncop.c
parent3c3b6377d6bdea9bffec31da88dd629347617b6d (diff)
glusterd/svc: update pid of mux volumes from the shd process
For a normal volume, we are updating the pid from a the process while we do a daemonization or at the end of the init if it is no-daemon mode. Along with updating the pid we also lock the file, to make sure that the process is running fine. With brick mux, we were updating the pidfile from gluterd after an attach/detach request. There are two problems with this approach. 1) We are not holding a pidlock for any file other than parent process. 2) There is a chance for possible race conditions with attach/detach. For example, shd start and a volume stop could race. Let's say we are starting an shd and it is attached to a volume. While we trying to link the pid file to the running process, this would have deleted by the thread that doing a volume stop. Backport of : https://review.gluster.org/#/c/glusterfs/+/22935/ >Change-Id: I29a00352102877ce09ea3f376ca52affceb5cf1a >Updates: bz#1722541 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Change-Id: I29a00352102877ce09ea3f376ca52affceb5cf1a Updates: bz#1732668 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-syncop.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-syncop.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c
index 1c85c87a3f0..466f3e32223 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -143,6 +143,8 @@ gd_brick_op_req_free(gd1_mgmt_brick_op_req *req)
if (!req)
return;
+ if (req->dict.dict_val)
+ GF_FREE(req->dict.dict_val);
GF_FREE(req->input.input_val);
GF_FREE(req);
}