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