From 7bafeda4641582b5254f0e1f49e853dd87fe93f5 Mon Sep 17 00:00:00 2001 From: anand Date: Fri, 17 Apr 2015 14:19:46 +0530 Subject: libglusterfs: Implementation of sync lock as recursive lock to avoid crash. Problem : In glusterd,we are using big lock which is implemented based on sync task frame work for thread synchronization and rcu lock for data consistency. sync task frame work swap the threads if there is no worker poll threads available,due to this rcu lock and rcu unlock was happening in different threads (urcu-bp will not allow this),resulting into glusterd crash. fix : To avoid releasing the sync lock(big lock) in between rcu critical section,implemented sync lock as recursive lock. More details: link : http://www.spinics.net/lists/gluster-devel/msg14632.html Change-Id: I2b56c1caf3f0470f219b1adcaf62cce29cdc6b88 BUG: 1216942 Signed-off-by: anand Reviewed-on: http://review.gluster.org/10285 Reviewed-by: Atin Mukherjee Tested-by: Gluster Build System Tested-by: NetBSD Build System Reviewed-by: Vijay Bellur (cherry picked from commit ada6b3a8800867934af57a57d5312f5a5d8374f0) Reviewed-on: http://review.gluster.org/10432 Reviewed-by: Krishnan Parthasarathi Tested-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd-op-sm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 20aab8dfe27..4c6521f79ea 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -6910,6 +6910,6 @@ int glusterd_op_sm_init () { CDS_INIT_LIST_HEAD (&gd_op_sm_queue); - synclock_init (&gd_op_sm_lock); + synclock_init (&gd_op_sm_lock, SYNC_LOCK_DEFAULT); return 0; } -- cgit