summaryrefslogtreecommitdiffstats
path: root/xlators/features/locks
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2014-12-26 10:36:00 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2014-12-28 21:18:42 -0800
commit86433c25b61073f244cde0bf80a7857b57ab1265 (patch)
tree47c60ca11946a238a9e8400c28521bee04bf1560 /xlators/features/locks
parentb6ea761969f85fbb0f22810eb3a3bf1476c8792c (diff)
mgmt/glusterd: Add option to enable lock trace
Change-Id: I24ed0f866d53e91a8323c043a38f73207cbfd7d2 BUG: 1168189 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/9351 Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/features/locks')
-rw-r--r--xlators/features/locks/src/posix.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c
index af25a10..603bc58 100644
--- a/xlators/features/locks/src/posix.c
+++ b/xlators/features/locks/src/posix.c
@@ -2592,6 +2592,20 @@ pl_client_destroy_cbk (xlator_t *this, client_t *client)
return 0;
}
+int
+reconfigure (xlator_t *this, dict_t *options)
+{
+ posix_locks_private_t *priv = NULL;
+ int ret = -1;
+
+ priv = this->private;
+
+ GF_OPTION_RECONF ("trace", priv->trace, options, bool, out);
+
+ ret = 0;
+out:
+ return ret;
+}
int
init (xlator_t *this)
@@ -2599,7 +2613,6 @@ init (xlator_t *this)
posix_locks_private_t *priv = NULL;
xlator_list_t *trav = NULL;
data_t *mandatory = NULL;
- data_t *trace = NULL;
int ret = -1;
if (!this->children || this->children->next) {
@@ -2632,15 +2645,7 @@ init (xlator_t *this)
gf_log (this->name, GF_LOG_WARNING,
"mandatory locks not supported in this minor release.");
- trace = dict_get (this->options, "trace");
- if (trace) {
- if (gf_string2boolean (trace->data,
- &priv->trace) == -1) {
- gf_log (this->name, GF_LOG_ERROR,
- "'trace' takes on only boolean values.");
- goto out;
- }
- }
+ GF_OPTION_INIT ("trace", priv->trace, bool, out);
this->local_pool = mem_pool_new (pl_local_t, 32);
if (!this->local_pool) {