summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2020-01-03 09:59:29 +0530
committerAmar Tumballi <amarts@gmail.com>2020-01-07 18:15:11 +0000
commit144972bbddc4071600a1cc0380a997ada05c013d (patch)
tree4bd6f1d545c8999dc7b11467e140f9c40a799e63
parent10b0d19513100c3f7edf00936ea5ec06fc3f80a5 (diff)
afr: expose cluster.optimistic-change-log to CLI.
This volume option was not made avaialble to `gluster volume set` CLI. Reported-by: epolakis(https://github.com/kinsu) in https://github.com/gluster/glusterfs/issues/781 fixes: bz#1787554 Change-Id: I7141bdd4e53ee99e22b354edde8d023bfc0b2cd7 Signed-off-by: Ravishankar N <ravishankar@redhat.com>
-rw-r--r--libglusterfs/src/glusterfs/globals.h1
-rw-r--r--xlators/cluster/afr/src/afr.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-set.c5
3 files changed, 8 insertions, 0 deletions
diff --git a/libglusterfs/src/glusterfs/globals.h b/libglusterfs/src/glusterfs/globals.h
index 781ea04..f0c7395 100644
--- a/libglusterfs/src/glusterfs/globals.h
+++ b/libglusterfs/src/glusterfs/globals.h
@@ -117,6 +117,7 @@
#define GD_OP_VERSION_7_0 70000 /* Op-version for GlusterFS 7.0 */
#define GD_OP_VERSION_7_1 70100 /* Op-version for GlusterFS 7.1 */
+#define GD_OP_VERSION_7_2 70200 /* Op-version for GlusterFS 7.2 */
#define GD_OP_VERSION_8_0 80000 /* Op-version for GlusterFS 8.0 */
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c
index 13b5ca2..ec7aa22 100644
--- a/xlators/cluster/afr/src/afr.c
+++ b/xlators/cluster/afr/src/afr.c
@@ -241,6 +241,8 @@ reconfigure(xlator_t *this, dict_t *options)
out);
GF_OPTION_RECONF("eager-lock", priv->eager_lock, options, bool, out);
+ GF_OPTION_RECONF("optimistic-change-log", priv->optimistic_change_log,
+ options, bool, out);
GF_OPTION_RECONF("quorum-type", qtype, options, str, out);
GF_OPTION_RECONF("quorum-count", priv->quorum_count, options, uint32, out);
fix_quorum_options(this, priv, qtype, options);
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index b34b122..cec5b1a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -1108,6 +1108,11 @@ struct volopt_map_entry glusterd_volopt_map[] = {
.type = NO_DOC,
.op_version = GD_OP_VERSION_3_13_2,
.flags = VOLOPT_FLAG_CLIENT_OPT},
+ {.key = "cluster.optimistic-change-log",
+ .voltype = "cluster/replicate",
+ .type = NO_DOC,
+ .op_version = GD_OP_VERSION_7_2,
+ .flags = VOLOPT_FLAG_CLIENT_OPT},
/* IO-stats xlator options */
{.key = VKEY_DIAG_LAT_MEASUREMENT,