From 0504c5c24a8d8329321b9d5cdbc873c0fda32935 Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Wed, 3 Aug 2011 11:30:20 +0530 Subject: glusterd: Removed local cli lock This change contains, - removal of the local cli lock used to serialize cli ops to a glusterd. - glusterd's state-machine can handle competing 'lockers' with guaranteed progress. - flush cluster lock on 'owner' disconnecting and as 'owner', send unlock to all on first peer disconnect. Change-Id: I25961436b0790b4196f2b3438b105c37279399ad BUG: 3320 Reviewed-on: http://review.gluster.com/123 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd-utils.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.h') diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h index 93e2cb92d..1a4dadf1f 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-utils.h @@ -54,9 +54,11 @@ typedef struct glusterd_voldict_ctx_ { typedef int (*glusterd_condition_func) (glusterd_volinfo_t *volinfo, glusterd_brickinfo_t *brickinfo, void *ctx); - typedef struct glusterd_lock_ glusterd_lock_t; +int32_t +glusterd_get_lock_owner (uuid_t *cur_owner); + int32_t glusterd_lock (uuid_t new_owner); -- cgit