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