summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix-helpers.c
diff options
context:
space:
mode:
authorMohit Agrawal <moagrawa@redhat.com>2017-06-08 13:04:42 +0530
committerJeff Darcy <jeff@pl.atyp.us>2017-06-09 22:43:54 +0000
commit5b82f173ba337b2fe06846c2a0e5f35d1ff53357 (patch)
treecbf8a6d7c35d069a203caceb83ce38ed125b43d6 /xlators/storage/posix/src/posix-helpers.c
parentd95aa04e482ebe4306df721fe0aa3697a0426a85 (diff)
glusterfsd: Deletion of brick dir throw emerg msgs after stop volume
Problem: Deletion of brick directories throw emerg messages after stop volume while brick mux is enabled. Solution: Modify the posix health check monitor thread code to handled correctly. BUG: 1459781 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Change-Id: I2d22a84f9a98b0da261e5fb7850ba1368f3601d7 Reviewed-on: https://review.gluster.org/17492 Tested-by: MOHIT AGRAWAL <moagrawa@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Diffstat (limited to 'xlators/storage/posix/src/posix-helpers.c')
-rw-r--r--xlators/storage/posix/src/posix-helpers.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c
index 52be925..9e4ab5e 100644
--- a/xlators/storage/posix/src/posix-helpers.c
+++ b/xlators/storage/posix/src/posix-helpers.c
@@ -1864,15 +1864,15 @@ posix_health_check_thread_proc (void *data)
ret = sleep (interval);
if (ret > 0)
break;
-
/* prevent thread errors while doing the health-check(s) */
pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, NULL);
/* Do the health-check.*/
ret = posix_fs_health_check (this);
- if (ret < 0)
+ if (ret < 0 && priv->health_check_active)
goto abort;
-
+ if (!priv->health_check_active)
+ goto out;
pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL);
}