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