21ab4e
From 8fb1fb71943aa602ac52a271563b141aa764ea69 Mon Sep 17 00:00:00 2001
21ab4e
From: Ashish Pandey <aspandey@redhat.com>
21ab4e
Date: Thu, 14 Apr 2016 16:19:40 +0530
21ab4e
Subject: [PATCH 389/393] cluster/ec: Add/Modify description for eager-lock
21ab4e
 option
21ab4e
21ab4e
This patch provides description for disperse.eager-lock
21ab4e
option for disperse volume.
21ab4e
21ab4e
It also modifies the description for cluster.eager-lock
21ab4e
option to indicate that this option is only for replica
21ab4e
volume.
21ab4e
21ab4e
>Change-Id: Ie73298947fcaaa6aaf825978bc2d27ceaff386d2
21ab4e
>BUG: 1327171
21ab4e
>Signed-off-by: Ashish Pandey <aspandey@redhat.com>
21ab4e
>Reviewed-on: http://review.gluster.org/13999
21ab4e
>NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
21ab4e
>Smoke: Gluster Build System <jenkins@build.gluster.com>
21ab4e
>Reviewed-by: Ravishankar N <ravishankar@redhat.com>
21ab4e
>CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
21ab4e
>Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
21ab4e
21ab4e
BUG: 1435656
21ab4e
Change-Id: Ie73298947fcaaa6aaf825978bc2d27ceaff386d2
21ab4e
Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
21ab4e
Reviewed-on: https://code.engineering.redhat.com/gerrit/101383
21ab4e
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
21ab4e
---
21ab4e
 xlators/cluster/afr/src/afr.c |  9 +++++----
21ab4e
 xlators/cluster/ec/src/ec.c   | 14 ++++++++++++--
21ab4e
 2 files changed, 17 insertions(+), 6 deletions(-)
21ab4e
21ab4e
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c
21ab4e
index b76a06a..375bd1f 100644
21ab4e
--- a/xlators/cluster/afr/src/afr.c
21ab4e
+++ b/xlators/cluster/afr/src/afr.c
21ab4e
@@ -779,16 +779,17 @@ struct volume_options options[] = {
21ab4e
         { .key = {"eager-lock"},
21ab4e
           .type = GF_OPTION_TYPE_BOOL,
21ab4e
           .default_value = "on",
21ab4e
-          .description = "Lock phase of a transaction has two sub-phases. "
21ab4e
+          .description = "Enable/Disable eager lock for replica volume. "
21ab4e
+                         "Lock phase of a transaction has two sub-phases. "
21ab4e
                          "First is an attempt to acquire locks in parallel by "
21ab4e
                          "broadcasting non-blocking lock requests. If lock "
21ab4e
                          "acquisition fails on any server, then the held locks "
21ab4e
-                         "are unlocked and revert to a blocking locked mode "
21ab4e
+                         "are unlocked and we revert to a blocking locks mode "
21ab4e
                          "sequentially on one server after another.  If this "
21ab4e
                          "option is enabled the initial broadcasting lock "
21ab4e
-                         "request attempt to acquire lock on the entire file. "
21ab4e
+                         "request attempts to acquire a full lock on the entire file. "
21ab4e
                          "If this fails, we revert back to the sequential "
21ab4e
-                         "\"regional\" blocking lock as before. In the case "
21ab4e
+                         "\"regional\" blocking locks as before. In the case "
21ab4e
                          "where such an \"eager\" lock is granted in the "
21ab4e
                          "non-blocking phase, it gives rise to an opportunity "
21ab4e
                          "for optimization. i.e, if the next write transaction "
21ab4e
diff --git a/xlators/cluster/ec/src/ec.c b/xlators/cluster/ec/src/ec.c
21ab4e
index 5c85677..dfd8129 100644
21ab4e
--- a/xlators/cluster/ec/src/ec.c
21ab4e
+++ b/xlators/cluster/ec/src/ec.c
21ab4e
@@ -1363,8 +1363,18 @@ struct volume_options options[] =
21ab4e
     { .key = {"eager-lock"},
21ab4e
       .type = GF_OPTION_TYPE_BOOL,
21ab4e
       .default_value = "on",
21ab4e
-      .description = "This option will enable/diable eager lock for"
21ab4e
-                     "disperse volume "
21ab4e
+      .description = "Enable/Disable eager lock for disperse volume. "
21ab4e
+                     "If a fop takes a lock and completes its operation, "
21ab4e
+                     "it waits for next 1 second before releasing the lock, "
21ab4e
+                     "to see if the lock can be reused for next fop from "
21ab4e
+                     "the same client. If ec finds any lock contention within "
21ab4e
+                     "1 second it releases the lock immediately before time "
21ab4e
+                     "expires. This improves the performance of file operations."
21ab4e
+                     "However, as it takes lock on first brick, for few operations "
21ab4e
+                     "like read, discovery of lock contention might take long time "
21ab4e
+                     "and can actually degrade the performance. "
21ab4e
+                     "If eager lock is disabled, lock will be released as soon as fop "
21ab4e
+                     "completes. "
21ab4e
     },
21ab4e
     { .key = {"background-heals"},
21ab4e
       .type = GF_OPTION_TYPE_INT,
21ab4e
-- 
21ab4e
1.8.3.1
21ab4e