From aa4e7d04ff20e38182a62576595951d59524fff0 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Sat, 28 Jul 2012 12:18:50 +0530 Subject: features/locks: Fix statedump code RCA: Taking blocking mutex/spin locks lead to dead locks because of the locking order in statedumps. Also we were asked to remove gf_logs if possible to avoid extra cost in signal handlers. Fix: changed blocking mutes/spin locks to their non-blocking variants. Removed gf_logs in locks xlator statedump code-path. Tests: State-dump success cases are working fine. Triggered try-lock failures by putting statedumps in a while loop. In parallel did chown of the same file in a while loop. BUG: 843781 Change-Id: Iac9b75d79cd5e036cd3eafc1e106074e2c6b5c47 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.com/3752 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/features/locks/src/common.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xlators/features/locks/src/common.h') diff --git a/xlators/features/locks/src/common.h b/xlators/features/locks/src/common.h index 2cf9aa38093..97faa5b92be 100644 --- a/xlators/features/locks/src/common.h +++ b/xlators/features/locks/src/common.h @@ -87,9 +87,13 @@ grant_blocked_entry_locks (xlator_t *this, pl_inode_t *pl_inode, void pl_update_refkeeper (xlator_t *this, inode_t *inode); +int32_t +__get_inodelk_count (xlator_t *this, pl_inode_t *pl_inode); int32_t get_inodelk_count (xlator_t *this, inode_t *inode); +int32_t +__get_entrylk_count (xlator_t *this, pl_inode_t *pl_inode); int32_t get_entrylk_count (xlator_t *this, inode_t *inode); -- cgit