From 46920e3bd38d9ae7c1910d0bd83eff309ab20c66 Mon Sep 17 00:00:00 2001 From: Ashish Pandey Date: Fri, 4 Mar 2016 13:05:09 +0530 Subject: cluster/ec: Provide an option to enable/disable eager lock Problem: If a fop takes lock, and completes its operation, it waits for 1 second before releasing the lock. However, If ec find any lock contention within this time period, it release the lock immediately before time expires. As we take lock on first brick, for few operations, like read, it might happen that discovery of lock contention might take long time and can degrades the performance. Solution: Provide an option to enable/disable eager lock. If eager lock is disabled, lock will be released as soon as fop completes. gluster v set disperse.eager-lock on gluster v set disperse.eager-lock off master- http://review.gluster.org/13605 Change-Id: I000985a787eba3c190fdcd5981dfbf04e64af166 BUG: 1318965 Signed-off-by: Ashish Pandey Reviewed-on: http://review.gluster.org/13773 Smoke: Gluster Build System CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Pranith Kumar Karampuri --- xlators/mgmt/glusterd/src/glusterd-volume-set.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'xlators/mgmt/glusterd/src') diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c index b8821680d4c..bbfe2d387d2 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c @@ -1080,6 +1080,11 @@ struct volopt_map_entry glusterd_volopt_map[] = { .op_version = 1, .flags = OPT_FLAG_CLIENT_OPT }, + { .key = "disperse.eager-lock", + .voltype = "cluster/disperse", + .op_version = GD_OP_VERSION_3_7_10, + .flags = OPT_FLAG_CLIENT_OPT + }, { .key = "cluster.quorum-type", .voltype = "cluster/replicate", .option = "quorum-type", -- cgit