diff options
author | Mohammed Rafi KC <rkavunga@redhat.com> | 2019-05-06 23:35:08 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2019-05-10 14:19:29 +0000 |
commit | b475551c66b86863cc93ebdfa6daeeab67bdbd9e (patch) | |
tree | 41abee1e5afbfc9d0891ff949f60bbcf2fbbc892 /xlators/mgmt/glusterd/src/glusterd.h | |
parent | 9ab2747da78061882f6734df4b265bce11adaef1 (diff) |
shd/glusterd: Serialize shd manager to prevent race condition
At the time of a glusterd restart, while doing a handshake
there is a possibility that multiple shd manager might get
executed. Because of this, there is a chance that multiple
shd get spawned during a glusterd restart
Change-Id: Ie20798441e07d7d7a93b7d38dfb924cea178a920
fixes: bz#1707081
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index 5b9fed6c80d..ca8e82afb47 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -219,6 +219,9 @@ typedef struct { gf_atomic_t blockers; uint32_t mgmt_v3_lock_timeout; gf_boolean_t restart_bricks; + gf_boolean_t restart_shd; /* This flag prevents running two shd manager + simultaneously + */ pthread_mutex_t attach_lock; /* Lock can be per process or a common one */ pthread_mutex_t volume_lock; /* We release the big_lock from lot of places which might lead the modification of volinfo |