From 12c5b9d774f6e03b69efc8e276165debdf360cb6 Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Fri, 19 May 2017 21:04:53 +0530 Subject: glusterfsd: process attach and detach request inside lock With brick multiplexing, there is a high possibility that attach and detach requests might be parallely processed and to avoid a concurrent update to the same graph list, a mutex lock is required. Please note this backport defines the volfile_lock mutex which was done as part of a different patch https://review.gluster.org/15036 in mainline but is not available in release-3.11 branch. Credits : Rafi (rkavunga@redhat.com) for the RCA of this issue >Reviewed-on: https://review.gluster.org/17374 >Smoke: Gluster Build System >NetBSD-regression: NetBSD Build System >CentOS-regression: Gluster Build System >Reviewed-by: Jeff Darcy >(cherry picked from commit 3ca5ae2f3bff2371042b607b8e8a218bf316b48c) Change-Id: Ic8e6d1708655c8a143c5a3690968dfa572a32a9c BUG: 1455907 Signed-off-by: Atin Mukherjee Reviewed-on: https://review.gluster.org/17402 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Shyamsundar Ranganathan --- libglusterfs/src/glusterfs.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libglusterfs') diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h index bc379d6d1d7..7eaeb0c7dbd 100644 --- a/libglusterfs/src/glusterfs.h +++ b/libglusterfs/src/glusterfs.h @@ -520,6 +520,8 @@ struct _glusterfs_ctx { int notifying; struct gf_ctx_tw *tw; /* refcounted timer_wheel */ + + gf_lock_t volfile_lock; }; typedef struct _glusterfs_ctx glusterfs_ctx_t; -- cgit