From 64ba4fde9fca5cfc059395a444b55f57940ab06b Mon Sep 17 00:00:00 2001 From: Susant Palai Date: Mon, 22 Jul 2019 15:20:43 +0530 Subject: locks/fencing: Address hang while lock preemption The fop_wind_count can go negative when fencing is enabled on unwind path of the IO leading to hang. Also changed code so that fop_wind_count needs to be maintained only till fencing is enabled on the file. > updates: bz#1717824 > Change-Id: Icd04b42bc16cd3d50eaa581ee57233910194f480 > signed-off-by: Susant Palai (backport of https://review.gluster.org/#/c/glusterfs/+/23088/) fixes: bz#1740494 Change-Id: Icd04b42bc16cd3d50eaa581ee57233910194f480 Signed-off-by: Susant Palai --- xlators/features/locks/src/locks.h | 1 + 1 file changed, 1 insertion(+) (limited to 'xlators/features/locks/src/locks.h') diff --git a/xlators/features/locks/src/locks.h b/xlators/features/locks/src/locks.h index b817960a4c4..0ab2aa6cbae 100644 --- a/xlators/features/locks/src/locks.h +++ b/xlators/features/locks/src/locks.h @@ -197,6 +197,7 @@ struct __pl_inode { */ int fop_wind_count; pthread_cond_t check_fop_wind_count; + gf_boolean_t track_fop_wind_count; }; typedef struct __pl_inode pl_inode_t; -- cgit