diff options
author | Ravishankar N <ravishankar@redhat.com> | 2020-01-08 11:11:53 +0530 |
---|---|---|
committer | Rinku Kothiya <rkothiya@redhat.com> | 2020-01-09 13:22:22 +0000 |
commit | dc2c94c6df87cb3e97adfff080123db883f7a591 (patch) | |
tree | 97a8fb54c48e51455140149095cf63664b2ba768 | |
parent | 425518cec6e62dd8e3b185fd33b6c03aa3dc1459 (diff) |
afr: expose cluster.optimistic-change-log to CLI.
Backport of https://review.gluster.org/#/c/glusterfs/+/23960/
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#1788785
Change-Id: I7141bdd4e53ee99e22b354edde8d023bfc0b2cd7
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
-rw-r--r-- | libglusterfs/src/glusterfs/globals.h | 3 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr.c | 2 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volume-set.c | 5 |
3 files changed, 9 insertions, 1 deletions
diff --git a/libglusterfs/src/glusterfs/globals.h b/libglusterfs/src/glusterfs/globals.h index e19a7cf8b95..b6ea799b0e1 100644 --- a/libglusterfs/src/glusterfs/globals.h +++ b/libglusterfs/src/glusterfs/globals.h @@ -45,7 +45,7 @@ 1 /* MIN is the fresh start op-version, mostly \ should not change */ #define GD_OP_VERSION_MAX \ - GD_OP_VERSION_7_0 /* MAX VERSION is the maximum \ + GD_OP_VERSION_7_2 /* MAX VERSION is the maximum \ count in VME table, should \ keep changing with \ introduction of newer \ @@ -116,6 +116,7 @@ #define GD_OP_VERSION_6_0 60000 /* Op-version for GlusterFS 6.0 */ #define GD_OP_VERSION_7_0 70000 /* Op-version for GlusterFS 7.0 */ +#define GD_OP_VERSION_7_2 70200 /* Op-version for GlusterFS 7.2 */ #define GD_OP_VER_PERSISTENT_AFR_XATTRS GD_OP_VERSION_3_6_0 diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c index b2c64ecf0e6..6859e0efb94 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 11ec4500453..8c13418751f 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c @@ -1096,6 +1096,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, |