From 6ab37f0cb4fd8313dab93360a41acbaf422f39b5 Mon Sep 17 00:00:00 2001 From: Venky Shankar Date: Thu, 4 Jun 2015 08:50:48 +0530 Subject: features/bitrot: cleanup, v2 This patch uses "cleanup, v1" infrastrcuture to cleanup scrubber (data structures, threads, timers, etc..) on brick disconnection. Signer is not cleaned up yet: probably would be done as part of another patch. Change-Id: I78a92b8a7f02b2f39078aa9a5a6b101fc499fd70 BUG: 1231619 Signed-off-by: Venky Shankar Reviewed-on: http://review.gluster.org/11148 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Raghavendra Bhat --- libglusterfs/src/common-utils.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libglusterfs/src/common-utils.c') diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index 1b02ca5f217..f013f93ee1e 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -4019,3 +4019,14 @@ out: return ret; } +void +_mask_cancellation (void) +{ + (void) pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, NULL); +} + +void +_unmask_cancellation (void) +{ + (void) pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL); +} -- cgit