From c8e78e589bd1ef90085d267f4732caf99450c0c5 Mon Sep 17 00:00:00 2001
From: Mohit Agrawal <moagrawa@redhat.com>
Date: Thu, 13 Jul 2017 12:23:13 +0530
Subject: [PATCH 563/566] posix: brick process crash after stop the volume
while brick mux is on
Problem: sometime brick process is getting crash after stop the volume
while brick mux is enabled and no. of volumes are high
Solution: In posix notify at the time close mount_lock dir , dir handle
needs to set NULL to avoid the reuse of same dir handle.
> BUG: 1470533
> Change-Id: Ifd41c20b3c597317851f91049a7c801949840b16
> Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
> Reviewed-on: https://review.gluster.org/17767
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Amar Tumballi <amarts@redhat.com>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
> (cherry pick from commit 61db7125a5b8db0bd4dd09b423bb54415c8bd484)
BUG: 1468514
Change-Id: Iaa4bdb46ae03fdb4663c0b8bf828a185c33ad155
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/112271
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
---
xlators/storage/posix/src/posix.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index a08d858..26038fc 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -6614,8 +6614,10 @@ notify (xlator_t *this,
(void) gf_thread_cleanup_xint (priv->fsyncer);
priv->fsyncer = 0;
}
- if (priv->mount_lock)
+ if (priv->mount_lock) {
(void) sys_closedir (priv->mount_lock);
+ priv->mount_lock = NULL;
+ }
break;
default:
--
1.8.3.1