summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshish Pandey <aspandey@redhat.com>2016-04-14 16:19:40 +0530
committerNiels de Vos <ndevos@redhat.com>2017-04-07 07:59:33 -0400
commite7b96efd37ed04fdfe8454f84e3e803f7edc754b (patch)
treee24047a447bab95cf7da45b6626c0a65754446a0
parentabe5b927878bb72e177942a79586300d98ac44f8 (diff)
cluster/ec: Add/Modify description for eager-lock option
This patch provides description for disperse.eager-lock option for disperse volume. It also modifies the description for cluster.eager-lock option to indicate that this option is only for replica volume. >Change-Id: Ie73298947fcaaa6aaf825978bc2d27ceaff386d2 >BUG: 1327171 >Signed-off-by: Ashish Pandey <aspandey@redhat.com> >Reviewed-on: http://review.gluster.org/13999 >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Smoke: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Ravishankar N <ravishankar@redhat.com> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> BUG: 1435645 Change-Id: I48b091e002b5c3308d6fbf2feb024a7f2fe08969 Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com> Reviewed-on: https://review.gluster.org/16943 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
-rw-r--r--xlators/cluster/afr/src/afr.c9
-rw-r--r--xlators/cluster/ec/src/ec.c14
2 files changed, 17 insertions, 6 deletions
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c
index 6f4783c9213..af81b77ddb6 100644
--- a/xlators/cluster/afr/src/afr.c
+++ b/xlators/cluster/afr/src/afr.c
@@ -766,16 +766,17 @@ struct volume_options options[] = {
{ .key = {"eager-lock"},
.type = GF_OPTION_TYPE_BOOL,
.default_value = "on",
- .description = "Lock phase of a transaction has two sub-phases. "
+ .description = "Enable/Disable eager lock for replica volume. "
+ "Lock phase of a transaction has two sub-phases. "
"First is an attempt to acquire locks in parallel by "
"broadcasting non-blocking lock requests. If lock "
"acquisition fails on any server, then the held locks "
- "are unlocked and revert to a blocking locked mode "
+ "are unlocked and we revert to a blocking locks mode "
"sequentially on one server after another. If this "
"option is enabled the initial broadcasting lock "
- "request attempt to acquire lock on the entire file. "
+ "request attempts to acquire a full lock on the entire file. "
"If this fails, we revert back to the sequential "
- "\"regional\" blocking lock as before. In the case "
+ "\"regional\" blocking locks as before. In the case "
"where such an \"eager\" lock is granted in the "
"non-blocking phase, it gives rise to an opportunity "
"for optimization. i.e, if the next write transaction "
diff --git a/xlators/cluster/ec/src/ec.c b/xlators/cluster/ec/src/ec.c
index b5e6bc08216..0a3a3cce391 100644
--- a/xlators/cluster/ec/src/ec.c
+++ b/xlators/cluster/ec/src/ec.c
@@ -1328,8 +1328,18 @@ struct volume_options options[] =
{ .key = {"eager-lock"},
.type = GF_OPTION_TYPE_BOOL,
.default_value = "on",
- .description = "This option will enable/diable eager lock for"
- "disperse volume "
+ .description = "Enable/Disable eager lock for disperse volume. "
+ "If a fop takes a lock and completes its operation, "
+ "it waits for next 1 second before releasing the lock, "
+ "to see if the lock can be reused for next fop from "
+ "the same client. If ec finds any lock contention within "
+ "1 second it releases the lock immediately before time "
+ "expires. This improves the performance of file operations."
+ "However, as it takes lock on first brick, for few operations "
+ "like read, discovery of lock contention might take long time "
+ "and can actually degrade the performance. "
+ "If eager lock is disabled, lock will be released as soon as fop "
+ "completes. "
},
{ .key = {"background-heals"},
.type = GF_OPTION_TYPE_INT,