e7a346
From f37a409a8c0fa683ad95a61bf71e949f215e2f81 Mon Sep 17 00:00:00 2001
e7a346
From: Gaurav Yadav <gyadav@redhat.com>
e7a346
Date: Thu, 5 Oct 2017 23:44:46 +0530
e7a346
Subject: [PATCH 48/74] glusterd : introduce timer in mgmt_v3_lock
e7a346
e7a346
Problem:
e7a346
In a multinode environment, if two of the op-sm transactions
e7a346
are initiated on one of the receiver nodes at the same time,
e7a346
there might be a possibility that glusterd  may end up in
e7a346
stale lock.
e7a346
e7a346
Solution:
e7a346
During mgmt_v3_lock a registration is made to  gf_timer_call_after
e7a346
which release the lock after certain period of time
e7a346
e7a346
>mainline patch : https://review.gluster.org/#/c/18437
e7a346
e7a346
Change-Id: I16cc2e5186a2e8a5e35eca2468b031811e093843
e7a346
BUG: 1442983
e7a346
Signed-off-by: Gaurav Yadav <gyadav@redhat.com>
e7a346
Reviewed-on: https://code.engineering.redhat.com/gerrit/123069
e7a346
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
e7a346
---
e7a346
 extras/glusterd.vol.in                     |   1 +
e7a346
 libglusterfs/src/common-utils.h            |   2 +-
e7a346
 libglusterfs/src/mem-types.h               |   1 +
e7a346
 xlators/mgmt/glusterd/src/glusterd-locks.c | 219 +++++++++++++++++++++++++++--
e7a346
 xlators/mgmt/glusterd/src/glusterd-locks.h |  13 ++
e7a346
 xlators/mgmt/glusterd/src/glusterd.c       |  28 +++-
e7a346
 xlators/mgmt/glusterd/src/glusterd.h       |   2 +
e7a346
 7 files changed, 246 insertions(+), 20 deletions(-)
e7a346
e7a346
diff --git a/extras/glusterd.vol.in b/extras/glusterd.vol.in
e7a346
index 0152996..fe413a9 100644
e7a346
--- a/extras/glusterd.vol.in
e7a346
+++ b/extras/glusterd.vol.in
e7a346
@@ -7,6 +7,7 @@ volume management
e7a346
     option transport.socket.read-fail-log off
e7a346
     option ping-timeout 0
e7a346
     option event-threads 1
e7a346
+#   option lock-timer 180
e7a346
 #   option transport.address-family inet6
e7a346
 #   option base-port 49152
e7a346
 #   option max-port  65535
e7a346
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h
e7a346
index e1c5f66..0131070 100644
e7a346
--- a/libglusterfs/src/common-utils.h
e7a346
+++ b/libglusterfs/src/common-utils.h
e7a346
@@ -102,7 +102,7 @@ void trap (void);
e7a346
 #define GF_CLNT_INSECURE_PORT_CEILING (GF_IANA_PRIV_PORTS_START - 1)
e7a346
 #define GF_PORT_MAX 65535
e7a346
 #define GF_PORT_ARRAY_SIZE ((GF_PORT_MAX + 7) / 8)
e7a346
-
e7a346
+#define GF_LOCK_TIMER 180
e7a346
 #define GF_MINUTE_IN_SECONDS 60
e7a346
 #define GF_HOUR_IN_SECONDS (60*60)
e7a346
 #define GF_DAY_IN_SECONDS (24*60*60)
e7a346
diff --git a/libglusterfs/src/mem-types.h b/libglusterfs/src/mem-types.h
e7a346
index d244fb5..85cb5d2 100644
e7a346
--- a/libglusterfs/src/mem-types.h
e7a346
+++ b/libglusterfs/src/mem-types.h
e7a346
@@ -177,6 +177,7 @@ enum gf_common_mem_types_ {
e7a346
         gf_common_mt_pthread_t,
e7a346
         gf_common_ping_local_t,
e7a346
         gf_common_volfile_t,
e7a346
+        gf_common_mt_mgmt_v3_lock_timer_t,
e7a346
         gf_common_mt_end
e7a346
 };
e7a346
 #endif
e7a346
diff --git a/xlators/mgmt/glusterd/src/glusterd-locks.c b/xlators/mgmt/glusterd/src/glusterd-locks.c
e7a346
index 146092d..bd73b37 100644
e7a346
--- a/xlators/mgmt/glusterd/src/glusterd-locks.c
e7a346
+++ b/xlators/mgmt/glusterd/src/glusterd-locks.c
e7a346
@@ -94,6 +94,50 @@ glusterd_mgmt_v3_lock_fini ()
e7a346
                 dict_unref (priv->mgmt_v3_lock);
e7a346
 }
e7a346
 
e7a346
+/* Initialize the global mgmt_v3_timer lock list(dict) when
e7a346
+ * glusterd is spawned */
e7a346
+int32_t
e7a346
+glusterd_mgmt_v3_lock_timer_init ()
e7a346
+{
e7a346
+        int32_t             ret = -1;
e7a346
+        xlator_t           *this   = NULL;
e7a346
+        glusterd_conf_t    *priv   = NULL;
e7a346
+
e7a346
+        this = THIS;
e7a346
+        GF_VALIDATE_OR_GOTO ("glusterd", this, out);
e7a346
+
e7a346
+        priv = this->private;
e7a346
+        GF_VALIDATE_OR_GOTO (this->name, priv, out);
e7a346
+
e7a346
+        priv->mgmt_v3_lock_timer = dict_new ();
e7a346
+        if (!priv->mgmt_v3_lock_timer)
e7a346
+                goto out;
e7a346
+
e7a346
+        ret = 0;
e7a346
+out:
e7a346
+        return ret;
e7a346
+}
e7a346
+
e7a346
+/* Destroy the global mgmt_v3_timer lock list(dict) when
e7a346
+ * glusterd cleanup is performed */
e7a346
+void
e7a346
+glusterd_mgmt_v3_lock_timer_fini ()
e7a346
+{
e7a346
+        xlator_t           *this   = NULL;
e7a346
+        glusterd_conf_t    *priv   = NULL;
e7a346
+
e7a346
+        this = THIS;
e7a346
+        GF_VALIDATE_OR_GOTO ("glusterd", this, out);
e7a346
+
e7a346
+        priv = this->private;
e7a346
+        GF_VALIDATE_OR_GOTO (this->name, priv, out);
e7a346
+
e7a346
+        if (priv->mgmt_v3_lock_timer)
e7a346
+                dict_unref (priv->mgmt_v3_lock_timer);
e7a346
+out:
e7a346
+        return;
e7a346
+}
e7a346
+
e7a346
 int32_t
e7a346
 glusterd_get_mgmt_v3_lock_owner (char *key, uuid_t *uuid)
e7a346
 {
e7a346
@@ -513,17 +557,23 @@ int32_t
e7a346
 glusterd_mgmt_v3_lock (const char *name, uuid_t uuid, uint32_t *op_errno,
e7a346
                        char *type)
e7a346
 {
e7a346
-        char                            key[PATH_MAX]   = "";
e7a346
-        int32_t                         ret             = -1;
e7a346
-        glusterd_mgmt_v3_lock_obj      *lock_obj        = NULL;
e7a346
-        glusterd_conf_t                *priv            = NULL;
e7a346
-        gf_boolean_t                    is_valid        = _gf_true;
e7a346
-        uuid_t                          owner           = {0};
e7a346
-        xlator_t                       *this            = NULL;
e7a346
-        char                           *bt              = NULL;
e7a346
+        char                            key[PATH_MAX]       = "";
e7a346
+        int32_t                         ret                 = -1;
e7a346
+        glusterd_mgmt_v3_lock_obj      *lock_obj            = NULL;
e7a346
+        glusterd_mgmt_v3_lock_timer    *mgmt_lock_timer     = NULL;
e7a346
+        glusterd_conf_t                *priv                = NULL;
e7a346
+        gf_boolean_t                    is_valid            = _gf_true;
e7a346
+        uuid_t                          owner               = {0};
e7a346
+        xlator_t                       *this                = NULL;
e7a346
+        char                           *bt                  = NULL;
e7a346
+        struct timespec                 delay               = {0};
e7a346
+        char                           *key_dup             = NULL;
e7a346
+        glusterfs_ctx_t                *mgmt_lock_timer_ctx = NULL;
e7a346
+        xlator_t                       *mgmt_lock_timer_xl  = NULL;
e7a346
 
e7a346
         this = THIS;
e7a346
         GF_ASSERT (this);
e7a346
+
e7a346
         priv = this->private;
e7a346
         GF_ASSERT (priv);
e7a346
 
e7a346
@@ -594,6 +644,42 @@ glusterd_mgmt_v3_lock (const char *name, uuid_t uuid, uint32_t *op_errno,
e7a346
                 goto out;
e7a346
         }
e7a346
 
e7a346
+        mgmt_lock_timer = GF_CALLOC (1, sizeof(glusterd_mgmt_v3_lock_timer),
e7a346
+                                     gf_common_mt_mgmt_v3_lock_timer_t);
e7a346
+
e7a346
+        if (!mgmt_lock_timer) {
e7a346
+                ret = -1;
e7a346
+                goto out;
e7a346
+        }
e7a346
+
e7a346
+        mgmt_lock_timer->xl = THIS;
e7a346
+        key_dup = gf_strdup (key);
e7a346
+        delay.tv_sec = priv->mgmt_v3_lock_timeout;
e7a346
+        delay.tv_nsec = 0;
e7a346
+
e7a346
+        ret = -1;
e7a346
+        mgmt_lock_timer_xl = mgmt_lock_timer->xl;
e7a346
+        GF_VALIDATE_OR_GOTO (this->name, mgmt_lock_timer_xl, out);
e7a346
+
e7a346
+        mgmt_lock_timer_ctx = mgmt_lock_timer_xl->ctx;
e7a346
+        GF_VALIDATE_OR_GOTO (this->name, mgmt_lock_timer_ctx, out);
e7a346
+
e7a346
+        mgmt_lock_timer->timer = gf_timer_call_after
e7a346
+                                     (mgmt_lock_timer_ctx, delay,
e7a346
+                                      gd_mgmt_v3_unlock_timer_cbk,
e7a346
+                                      key_dup);
e7a346
+
e7a346
+        ret = dict_set_bin (priv->mgmt_v3_lock_timer, key, mgmt_lock_timer,
e7a346
+                            sizeof (glusterd_mgmt_v3_lock_timer));
e7a346
+        if (ret) {
e7a346
+                gf_msg (this->name, GF_LOG_ERROR, 0,
e7a346
+                        GD_MSG_DICT_SET_FAILED,
e7a346
+                        "Unable to set timer in mgmt_v3 lock");
e7a346
+                GF_FREE (mgmt_lock_timer);
e7a346
+                goto out;
e7a346
+        }
e7a346
+
e7a346
+
e7a346
         /* Saving the backtrace into the pre-allocated buffer, ctx->btbuf*/
e7a346
         if ((bt = gf_backtrace_save (NULL))) {
e7a346
                 snprintf (key, sizeof (key), "debug.last-success-bt-%s-%s",
e7a346
@@ -617,18 +703,98 @@ out:
e7a346
         return ret;
e7a346
 }
e7a346
 
e7a346
+/*
e7a346
+ * This call back will ensure to unlock the lock_obj, in case we hit a situation
e7a346
+ * where unlocking failed and stale lock exist*/
e7a346
+void
e7a346
+gd_mgmt_v3_unlock_timer_cbk (void *data)
e7a346
+{
e7a346
+        xlator_t                        *this               = NULL;
e7a346
+        glusterd_conf_t                 *conf               = NULL;
e7a346
+        glusterd_mgmt_v3_lock_timer     *mgmt_lock_timer    = NULL;
e7a346
+        char                            *key                = NULL;
e7a346
+        char                            *type               = NULL;
e7a346
+        char                            bt_key[PATH_MAX]    = "";
e7a346
+        char                            name[PATH_MAX]      = "";
e7a346
+        int32_t                         ret                 = -1;
e7a346
+        glusterfs_ctx_t                *mgmt_lock_timer_ctx = NULL;
e7a346
+        xlator_t                       *mgmt_lock_timer_xl  = NULL;
e7a346
+
e7a346
+        this = THIS;
e7a346
+        GF_VALIDATE_OR_GOTO ("glusterd", this, out);
e7a346
+
e7a346
+        conf = this->private;
e7a346
+        GF_VALIDATE_OR_GOTO (this->name, conf, out);
e7a346
+
e7a346
+        gf_log (THIS->name, GF_LOG_INFO, "In gd_mgmt_v3_unlock_timer_cbk");
e7a346
+        GF_ASSERT (NULL != data);
e7a346
+        key = (char *)data;
e7a346
+
e7a346
+        dict_del (conf->mgmt_v3_lock, key);
e7a346
+
e7a346
+        type = strrchr (key, '_');
e7a346
+        strncpy (name, key, strlen (key) - strlen (type) - 1);
e7a346
+
e7a346
+        ret = snprintf (bt_key, PATH_MAX, "debug.last-success-bt-%s-%s",
e7a346
+                        name, type + 1);
e7a346
+        if (ret != strlen ("debug.last-success-bt-") + strlen (name) +
e7a346
+                   strlen (type)) {
e7a346
+                gf_msg (this->name, GF_LOG_ERROR, 0,
e7a346
+                        GD_MSG_CREATE_KEY_FAIL, "Unable to create backtrace "
e7a346
+                        "key");
e7a346
+                goto out;
e7a346
+        }
e7a346
+
e7a346
+        dict_del (conf->mgmt_v3_lock, bt_key);
e7a346
+
e7a346
+        ret = dict_get_bin (conf->mgmt_v3_lock_timer, key,
e7a346
+                            (void **)&mgmt_lock_timer);
e7a346
+        if (ret) {
e7a346
+                gf_msg (this->name, GF_LOG_ERROR, 0,
e7a346
+                        GD_MSG_DICT_SET_FAILED,
e7a346
+                        "Unable to get lock owner in mgmt_v3 lock");
e7a346
+                goto out;
e7a346
+        }
e7a346
+
e7a346
+out:
e7a346
+        if (mgmt_lock_timer->timer) {
e7a346
+                mgmt_lock_timer_xl = mgmt_lock_timer->xl;
e7a346
+                GF_VALIDATE_OR_GOTO (this->name, mgmt_lock_timer_xl,
e7a346
+                                     ret_function);
e7a346
+
e7a346
+                mgmt_lock_timer_ctx = mgmt_lock_timer_xl->ctx;
e7a346
+                GF_VALIDATE_OR_GOTO (this->name, mgmt_lock_timer_ctx,
e7a346
+                                     ret_function);
e7a346
+
e7a346
+                gf_timer_call_cancel (mgmt_lock_timer_ctx,
e7a346
+                                      mgmt_lock_timer->timer);
e7a346
+                GF_FREE(key);
e7a346
+                dict_del (conf->mgmt_v3_lock_timer, bt_key);
e7a346
+                mgmt_lock_timer->timer = NULL;
e7a346
+        }
e7a346
+
e7a346
+ret_function:
e7a346
+
e7a346
+        return;
e7a346
+}
e7a346
+
e7a346
 int32_t
e7a346
 glusterd_mgmt_v3_unlock (const char *name, uuid_t uuid, char *type)
e7a346
 {
e7a346
-        char                    key[PATH_MAX]   = "";
e7a346
-        int32_t                 ret             = -1;
e7a346
-        gf_boolean_t            is_valid        = _gf_true;
e7a346
-        glusterd_conf_t        *priv            = NULL;
e7a346
-        uuid_t                  owner           = {0};
e7a346
-        xlator_t               *this            = NULL;
e7a346
+        char                            key[PATH_MAX]       = "";
e7a346
+        char                            key_dup[PATH_MAX]   = "";
e7a346
+        int32_t                         ret                 = -1;
e7a346
+        gf_boolean_t                    is_valid            = _gf_true;
e7a346
+        glusterd_conf_t                 *priv               = NULL;
e7a346
+        glusterd_mgmt_v3_lock_timer     *mgmt_lock_timer    = NULL;
e7a346
+        uuid_t                          owner               = {0};
e7a346
+        xlator_t                        *this               = NULL;
e7a346
+        glusterfs_ctx_t                *mgmt_lock_timer_ctx = NULL;
e7a346
+        xlator_t                       *mgmt_lock_timer_xl  = NULL;
e7a346
 
e7a346
         this = THIS;
e7a346
         GF_ASSERT (this);
e7a346
+
e7a346
         priv = this->private;
e7a346
         GF_ASSERT (priv);
e7a346
 
e7a346
@@ -657,6 +823,7 @@ glusterd_mgmt_v3_unlock (const char *name, uuid_t uuid, char *type)
e7a346
                 ret = -1;
e7a346
                 goto out;
e7a346
         }
e7a346
+        strncpy (key_dup, key, strlen(key));
e7a346
 
e7a346
         gf_msg_debug (this->name, 0,
e7a346
                 "Trying to release lock of %s %s for %s as %s",
e7a346
@@ -690,6 +857,15 @@ glusterd_mgmt_v3_unlock (const char *name, uuid_t uuid, char *type)
e7a346
         /* Removing the mgmt_v3 lock from the global list */
e7a346
         dict_del (priv->mgmt_v3_lock, key);
e7a346
 
e7a346
+        ret = dict_get_bin (priv->mgmt_v3_lock_timer, key,
e7a346
+                            (void **)&mgmt_lock_timer);
e7a346
+        if (ret) {
e7a346
+                gf_msg (this->name, GF_LOG_ERROR, 0,
e7a346
+                        GD_MSG_DICT_SET_FAILED,
e7a346
+                        "Unable to get mgmt lock key in mgmt_v3 lock");
e7a346
+                goto out;
e7a346
+        }
e7a346
+
e7a346
         /* Remove the backtrace key as well */
e7a346
         ret = snprintf (key, sizeof(key), "debug.last-success-bt-%s-%s", name,
e7a346
                         type);
e7a346
@@ -708,7 +884,22 @@ glusterd_mgmt_v3_unlock (const char *name, uuid_t uuid, char *type)
e7a346
                 type, name);
e7a346
 
e7a346
         ret = 0;
e7a346
+        /* Release owner refernce which was held during lock */
e7a346
+        if (mgmt_lock_timer->timer) {
e7a346
+                ret = -1;
e7a346
+                mgmt_lock_timer_xl = mgmt_lock_timer->xl;
e7a346
+                GF_VALIDATE_OR_GOTO (this->name, mgmt_lock_timer_xl, out);
e7a346
+
e7a346
+                mgmt_lock_timer_ctx = mgmt_lock_timer_xl->ctx;
e7a346
+                GF_VALIDATE_OR_GOTO (this->name, mgmt_lock_timer_ctx, out);
e7a346
+                ret = 0;
e7a346
+                gf_timer_call_cancel (mgmt_lock_timer_ctx,
e7a346
+                                      mgmt_lock_timer->timer);
e7a346
+                dict_del (priv->mgmt_v3_lock_timer, key_dup);
e7a346
+                mgmt_lock_timer->timer = NULL;
e7a346
+        }
e7a346
 out:
e7a346
+
e7a346
         gf_msg_trace (this->name, 0, "Returning %d", ret);
e7a346
         return ret;
e7a346
 }
e7a346
diff --git a/xlators/mgmt/glusterd/src/glusterd-locks.h b/xlators/mgmt/glusterd/src/glusterd-locks.h
e7a346
index 437053d..226d5c6 100644
e7a346
--- a/xlators/mgmt/glusterd/src/glusterd-locks.h
e7a346
+++ b/xlators/mgmt/glusterd/src/glusterd-locks.h
e7a346
@@ -14,6 +14,11 @@ typedef struct glusterd_mgmt_v3_lock_object_ {
e7a346
         uuid_t              lock_owner;
e7a346
 } glusterd_mgmt_v3_lock_obj;
e7a346
 
e7a346
+typedef struct glusterd_mgmt_v3_lock_timer_ {
e7a346
+        gf_timer_t *timer;
e7a346
+        xlator_t      *xl;
e7a346
+} glusterd_mgmt_v3_lock_timer;
e7a346
+
e7a346
 typedef struct glusterd_mgmt_v3_lock_valid_entities {
e7a346
         char          *type;          /* Entity type like vol, snap */
e7a346
         gf_boolean_t   default_value; /* The default value that  *
e7a346
@@ -29,6 +34,12 @@ void
e7a346
 glusterd_mgmt_v3_lock_fini ();
e7a346
 
e7a346
 int32_t
e7a346
+glusterd_mgmt_v3_lock_timer_init ();
e7a346
+
e7a346
+void
e7a346
+glusterd_mgmt_v3_lock_timer_fini ();
e7a346
+
e7a346
+int32_t
e7a346
 glusterd_get_mgmt_v3_lock_owner (char *volname, uuid_t *uuid);
e7a346
 
e7a346
 int32_t
e7a346
@@ -44,4 +55,6 @@ glusterd_multiple_mgmt_v3_lock (dict_t *dict, uuid_t uuid, uint32_t *op_errno);
e7a346
 int32_t
e7a346
 glusterd_multiple_mgmt_v3_unlock (dict_t *dict, uuid_t uuid);
e7a346
 
e7a346
+void
e7a346
+gd_mgmt_v3_unlock_timer_cbk(void *data);
e7a346
 #endif
e7a346
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
e7a346
index 6ce4156..ed01b93 100644
e7a346
--- a/xlators/mgmt/glusterd/src/glusterd.c
e7a346
+++ b/xlators/mgmt/glusterd/src/glusterd.c
e7a346
@@ -1858,14 +1858,22 @@ init (xlator_t *this)
e7a346
                 gf_msg (this->name, GF_LOG_INFO, 0,
e7a346
                         GD_MSG_DICT_SET_FAILED,
e7a346
                         "base-port override: %d", conf->base_port);
e7a346
-         }
e7a346
-         conf->max_port = GF_PORT_MAX;
e7a346
-         if (dict_get_uint32 (this->options, "max-port",
e7a346
-                              &conf->max_port) == 0) {
e7a346
+        }
e7a346
+        conf->max_port = GF_PORT_MAX;
e7a346
+        if (dict_get_uint32 (this->options, "max-port",
e7a346
+                             &conf->max_port) == 0) {
e7a346
                 gf_msg (this->name, GF_LOG_INFO, 0,
e7a346
                         GD_MSG_DICT_SET_FAILED,
e7a346
                         "max-port override: %d", conf->max_port);
e7a346
-         }
e7a346
+        }
e7a346
+
e7a346
+        conf->mgmt_v3_lock_timeout = GF_LOCK_TIMER;
e7a346
+        if (dict_get_uint32 (this->options, "lock-timer",
e7a346
+                             &conf->mgmt_v3_lock_timeout) == 0) {
e7a346
+                gf_msg (this->name, GF_LOG_INFO, 0,
e7a346
+                        GD_MSG_DICT_SET_FAILED,
e7a346
+                        "lock-timer override: %d", conf->mgmt_v3_lock_timeout);
e7a346
+        }
e7a346
 
e7a346
         /* Set option to run bricks on valgrind if enabled in glusterd.vol */
e7a346
         this->ctx->cmd_args.valgrind = valgrind;
e7a346
@@ -1891,6 +1899,7 @@ init (xlator_t *this)
e7a346
 
e7a346
         this->private = conf;
e7a346
         glusterd_mgmt_v3_lock_init ();
e7a346
+        glusterd_mgmt_v3_lock_timer_init();
e7a346
         glusterd_txn_opinfo_dict_init ();
e7a346
         glusterd_svcs_build ();
e7a346
 
e7a346
@@ -2048,6 +2057,7 @@ fini (xlator_t *this)
e7a346
                 gf_store_handle_destroy (conf->handle);
e7a346
         glusterd_sm_tr_log_delete (&conf->op_sm_log);
e7a346
         glusterd_mgmt_v3_lock_fini ();
e7a346
+        glusterd_mgmt_v3_lock_timer_fini ();
e7a346
         glusterd_txn_opinfo_dict_fini ();
e7a346
         GF_FREE (conf);
e7a346
 
e7a346
@@ -2171,6 +2181,14 @@ struct volume_options options[] = {
e7a346
           .max = GF_PORT_MAX,
e7a346
           .description = "Sets the max port for portmap query"
e7a346
         },
e7a346
+        { .key = {"mgmt-v3-lock-timeout"},
e7a346
+          .type = GF_OPTION_TYPE_INT,
e7a346
+          .max = 600,
e7a346
+          .description = "Sets the mgmt-v3-lock-timeout for transactions."
e7a346
+                         "Specifes the default timeout value after which "
e7a346
+                         "lock acquired while performing transaction will "
e7a346
+                         "be released."
e7a346
+        },
e7a346
         { .key = {"snap-brick-path"},
e7a346
           .type = GF_OPTION_TYPE_STR,
e7a346
           .description = "directory where the bricks for the snapshots will be created"
e7a346
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h
e7a346
index 291f2f7..59b1775 100644
e7a346
--- a/xlators/mgmt/glusterd/src/glusterd.h
e7a346
+++ b/xlators/mgmt/glusterd/src/glusterd.h
e7a346
@@ -174,6 +174,7 @@ typedef struct {
e7a346
                                                  * cluster with no
e7a346
                                                  * transaction ids */
e7a346
 
e7a346
+        dict_t                    *mgmt_v3_lock_timer;
e7a346
         struct cds_list_head       mount_specs;
e7a346
         pthread_t                  brick_thread;
e7a346
         void                      *hooks_priv;
e7a346
@@ -195,6 +196,7 @@ typedef struct {
e7a346
         uint32_t                   generation;
e7a346
         int32_t                    workers;
e7a346
         uint32_t                   blockers;
e7a346
+        uint32_t                   mgmt_v3_lock_timeout;
e7a346
 } glusterd_conf_t;
e7a346
 
e7a346
 
e7a346
-- 
e7a346
1.8.3.1
e7a346