diff options
author | Niels de Vos <ndevos@redhat.com> | 2017-02-16 11:09:05 +0100 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2017-02-16 12:53:25 -0500 |
commit | baaea76bd93efe2cfdda52ab0b603fec713df455 (patch) | |
tree | 12d5ce3bb492c639642902ad7f7607112e97c73b | |
parent | b81a5f57460387661c773e6f3600f9221b4b0e8d (diff) |
md-cache: initialize mdc_counter.lock
add missed LOCK_INIT to fix INCREMENT_ATOMIC on
conf->mdc_counter.lock when pthread_spin_* using
Cherry picked from commit 22f02d8f1dcdf176744ab1536cb23a5fcd291243:
> Change-Id: I680bd6f41e3b8a1852ed969bf6794cbf4c1ccdd4
> BUG: 1417913
> Signed-off-by: Vitaly Lipatov <lav@etersoft.ru>
> Reviewed-on: https://review.gluster.org/16515
> Reviewed-by: Niels de Vos <ndevos@redhat.com>
> Tested-by: Niels de Vos <ndevos@redhat.com>
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> Reviewed-by: Poornima G <pgurusid@redhat.com>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Change-Id: I680bd6f41e3b8a1852ed969bf6794cbf4c1ccdd4
BUG: 1417915
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: https://review.gluster.org/16640
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Poornima G <pgurusid@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
-rw-r--r-- | xlators/performance/md-cache/src/md-cache.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c index 61f4da34067..cbbe8c20ee2 100644 --- a/xlators/performance/md-cache/src/md-cache.c +++ b/xlators/performance/md-cache/src/md-cache.c @@ -2983,6 +2983,7 @@ init (xlator_t *this) GF_OPTION_INIT("cache-invalidation", conf->mdc_invalidation, bool, out); LOCK_INIT (&conf->lock); + LOCK_INIT (&conf->mdc_counter.lock); time (&conf->last_child_down); /* If timeout is greater than 60s (default before the patch that added |