256ebe
From 78060c16f88594b3424e512a9ef0e4a8f56e88c3 Mon Sep 17 00:00:00 2001
256ebe
From: Kaushal M <kmadappa@redhat.com>
256ebe
Date: Thu, 6 Dec 2018 15:04:16 +0530
256ebe
Subject: [PATCH 02/52] glusterd: fix op-versions for RHS backwards
256ebe
 compatability
256ebe
256ebe
Backport of https://code.engineering.redhat.com/gerrit/#/c/60485/
256ebe
256ebe
This change fixes the op-version of different features and checks to maintain
256ebe
backwards compatability with RHS-3.0 and before.
256ebe
256ebe
Label: DOWNSTREAM ONLY
256ebe
256ebe
Change-Id: Icb282444da179b12fbd6ed9f491514602f1a38c2
256ebe
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
256ebe
Reviewed-on: https://code.engineering.redhat.com/gerrit/70348
256ebe
---
256ebe
 libglusterfs/src/glusterfs/globals.h               |  45 +++--
256ebe
 rpc/rpc-transport/socket/src/socket.c              |   4 +-
256ebe
 xlators/cluster/dht/src/dht-shared.c               |   6 +-
256ebe
 xlators/debug/io-stats/src/io-stats.c              |  16 +-
256ebe
 xlators/features/barrier/src/barrier.c             |   4 +-
256ebe
 xlators/mgmt/glusterd/src/glusterd-brick-ops.c     |   8 +-
256ebe
 xlators/mgmt/glusterd/src/glusterd-handler.c       |  14 +-
256ebe
 xlators/mgmt/glusterd/src/glusterd-op-sm.c         |  16 +-
256ebe
 xlators/mgmt/glusterd/src/glusterd-peer-utils.c    |   8 +-
256ebe
 xlators/mgmt/glusterd/src/glusterd-rebalance.c     |   4 +-
256ebe
 xlators/mgmt/glusterd/src/glusterd-replace-brick.c |   4 +-
256ebe
 xlators/mgmt/glusterd/src/glusterd-rpc-ops.c       |   6 +-
256ebe
 xlators/mgmt/glusterd/src/glusterd-sm.c            |   2 +-
256ebe
 .../mgmt/glusterd/src/glusterd-snapshot-utils.c    |  12 +-
256ebe
 xlators/mgmt/glusterd/src/glusterd-snapshot.c      |   4 +-
256ebe
 xlators/mgmt/glusterd/src/glusterd-store.c         |  27 +--
256ebe
 xlators/mgmt/glusterd/src/glusterd-syncop.c        |   2 +-
256ebe
 xlators/mgmt/glusterd/src/glusterd-tier.c          |   3 +-
256ebe
 xlators/mgmt/glusterd/src/glusterd-utils.c         |   8 +-
256ebe
 xlators/mgmt/glusterd/src/glusterd-volume-ops.c    |  12 +-
256ebe
 xlators/mgmt/glusterd/src/glusterd-volume-set.c    | 192 +++++++++++----------
256ebe
 xlators/protocol/client/src/client.c               |   4 +-
256ebe
 xlators/protocol/server/src/server.c               |   6 +-
256ebe
 xlators/storage/posix/src/posix-common.c           |   4 +-
256ebe
 24 files changed, 214 insertions(+), 197 deletions(-)
256ebe
256ebe
diff --git a/libglusterfs/src/glusterfs/globals.h b/libglusterfs/src/glusterfs/globals.h
256ebe
index 8d898c3..b9da872 100644
256ebe
--- a/libglusterfs/src/glusterfs/globals.h
256ebe
+++ b/libglusterfs/src/glusterfs/globals.h
256ebe
@@ -23,23 +23,28 @@
256ebe
 #define GF_AVOID_OVERWRITE "glusterfs.avoid.overwrite"
256ebe
 #define GF_CLEAN_WRITE_PROTECTION "glusterfs.clean.writexattr"
256ebe
 
256ebe
-/* Gluster versions - OP-VERSION mapping
256ebe
+/* RHS versions - OP-VERSION mapping
256ebe
  *
256ebe
- * 3.3.x                - 1
256ebe
- * 3.4.x                - 2
256ebe
- * 3.5.0                - 3
256ebe
- * 3.5.1                - 30501
256ebe
- * 3.6.0                - 30600
256ebe
- * 3.7.0                - 30700
256ebe
- * 3.7.1                - 30701
256ebe
- * 3.7.2                - 30702
256ebe
+ * RHS-2.0 Z    - 1
256ebe
+ * RHS-2.1 Z    - 2
256ebe
+ * RHS-2.1 u5   - 20105
256ebe
+ * RHS-3.0      - 30000
256ebe
+ * RHS-3.0.4    - 30004
256ebe
+ * RHGS-3.1     - 30702
256ebe
  *
256ebe
- * Starting with Gluster v3.6, the op-version will be multi-digit integer values
256ebe
- * based on the Glusterfs version, instead of a simply incrementing integer
256ebe
- * value. The op-version for a given X.Y.Z release will be an integer XYZ, with
256ebe
- * Y and Z 2 digit always 2 digits wide and padded with 0 when needed. This
256ebe
- * should allow for some gaps between two Y releases for backports of features
256ebe
- * in Z releases.
256ebe
+ *
256ebe
+ * NOTE:
256ebe
+ * Starting with RHS-3.0, the op-version will be multi-digit integer values
256ebe
+ * based on the RHS version, instead of a simply incrementing integer value. The
256ebe
+ * op-version for a given RHS X(Major).Y(Minor).Z(Update) release will be an
256ebe
+ * integer with digits XYZ. The Y and Z values will be 2 digits wide always
256ebe
+ * padded with 0 as needed. This should allow for some gaps between two Y
256ebe
+ * releases for backports of features in Z releases.
256ebe
+ *
256ebe
+ * NOTE:
256ebe
+ * Starting with RHGS-3.1, the op-version will be the same as the upstream
256ebe
+ * GlusterFS op-versions. This is to allow proper access to upstream clients of
256ebe
+ * version 3.7.x or greater, proper access to the RHGS volumes.
256ebe
  */
256ebe
 #define GD_OP_VERSION_MIN                                                      \
256ebe
     1 /* MIN is the fresh start op-version, mostly                             \
256ebe
@@ -51,7 +56,13 @@
256ebe
                          introduction of newer                                 \
256ebe
                          versions */
256ebe
 
256ebe
-#define GD_OP_VERSION_3_6_0 30600 /* Op-Version for GlusterFS 3.6.0 */
256ebe
+#define GD_OP_VERSION_RHS_3_0    30000 /* Op-Version of RHS 3.0 */
256ebe
+
256ebe
+#define GD_OP_VER_PERSISTENT_AFR_XATTRS GD_OP_VERSION_RHS_3_0
256ebe
+
256ebe
+#define GD_OP_VERSION_RHS_2_1_5  20105 /* RHS 2.1 update 5 */
256ebe
+
256ebe
+#define GD_OP_VERSION_RHS_3_0_4  30004 /* Op-Version of RHS 3.0.4 */
256ebe
 
256ebe
 #define GD_OP_VERSION_3_7_0 30700 /* Op-version for GlusterFS 3.7.0 */
256ebe
 
256ebe
@@ -115,8 +126,6 @@
256ebe
 
256ebe
 #define GD_OP_VERSION_6_0 60000 /* Op-version for GlusterFS 6.0 */
256ebe
 
256ebe
-#define GD_OP_VER_PERSISTENT_AFR_XATTRS GD_OP_VERSION_3_6_0
256ebe
-
256ebe
 #include "glusterfs/xlator.h"
256ebe
 #include "glusterfs/options.h"
256ebe
 
256ebe
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
256ebe
index fa0e0f2..121d46b 100644
256ebe
--- a/rpc/rpc-transport/socket/src/socket.c
256ebe
+++ b/rpc/rpc-transport/socket/src/socket.c
256ebe
@@ -4704,7 +4704,7 @@ struct volume_options options[] = {
256ebe
      .description = "SSL CA list. Ignored if SSL is not enabled."},
256ebe
     {.key = {"ssl-cert-depth"},
256ebe
      .type = GF_OPTION_TYPE_INT,
256ebe
-     .op_version = {GD_OP_VERSION_3_6_0},
256ebe
+     .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
      .flags = OPT_FLAG_SETTABLE,
256ebe
      .description = "Maximum certificate-chain depth.  If zero, the "
256ebe
                     "peer's certificate itself must be in the local "
256ebe
@@ -4713,7 +4713,7 @@ struct volume_options options[] = {
256ebe
                     "local list.  Ignored if SSL is not enabled."},
256ebe
     {.key = {"ssl-cipher-list"},
256ebe
      .type = GF_OPTION_TYPE_STR,
256ebe
-     .op_version = {GD_OP_VERSION_3_6_0},
256ebe
+     .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
      .flags = OPT_FLAG_SETTABLE,
256ebe
      .description = "Allowed SSL ciphers. Ignored if SSL is not enabled."},
256ebe
     {.key = {"ssl-dh-param"},
256ebe
diff --git a/xlators/cluster/dht/src/dht-shared.c b/xlators/cluster/dht/src/dht-shared.c
256ebe
index c7ef2f1..ea4b7c6 100644
256ebe
--- a/xlators/cluster/dht/src/dht-shared.c
256ebe
+++ b/xlators/cluster/dht/src/dht-shared.c
256ebe
@@ -1064,7 +1064,7 @@ struct volume_options dht_options[] = {
256ebe
          "When enabled, files will be allocated to bricks "
256ebe
          "with a probability proportional to their size.  Otherwise, all "
256ebe
          "bricks will have the same probability (legacy behavior).",
256ebe
-     .op_version = {GD_OP_VERSION_3_6_0},
256ebe
+     .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
      .level = OPT_STATUS_BASIC,
256ebe
      .flags = OPT_FLAG_CLIENT_OPT | OPT_FLAG_SETTABLE | OPT_FLAG_DOC},
256ebe
 
256ebe
@@ -1161,7 +1161,7 @@ struct volume_options dht_options[] = {
256ebe
             "from which hash ranges are allocated starting with 0. "
256ebe
             "Note that we still use a directory/file's name to determine the "
256ebe
             "subvolume to which it hashes",
256ebe
-        .op_version = {GD_OP_VERSION_3_6_0},
256ebe
+        .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
     },
256ebe
 
256ebe
     {.key = {"rebal-throttle"},
256ebe
@@ -1174,7 +1174,7 @@ struct volume_options dht_options[] = {
256ebe
                     "migrated at a time. Lazy will allow only one file to "
256ebe
                     "be migrated at a time and aggressive will allow "
256ebe
                     "max of [($(processing units) - 4) / 2), 4]",
256ebe
-     .op_version = {GD_OP_VERSION_3_7_0},
256ebe
+     .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
      .level = OPT_STATUS_BASIC,
256ebe
      .flags = OPT_FLAG_CLIENT_OPT | OPT_FLAG_SETTABLE | OPT_FLAG_DOC
256ebe
 
256ebe
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c
256ebe
index f12191f..41b57c5 100644
256ebe
--- a/xlators/debug/io-stats/src/io-stats.c
256ebe
+++ b/xlators/debug/io-stats/src/io-stats.c
256ebe
@@ -4333,7 +4333,7 @@ struct volume_options options[] = {
256ebe
      .value = {GF_LOGGER_GLUSTER_LOG, GF_LOGGER_SYSLOG}},
256ebe
     {.key = {"client-logger"},
256ebe
      .type = GF_OPTION_TYPE_STR,
256ebe
-     .op_version = {GD_OP_VERSION_3_6_0},
256ebe
+     .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
      .flags = OPT_FLAG_SETTABLE | OPT_FLAG_CLIENT_OPT | OPT_FLAG_DOC,
256ebe
      .tags = {"io-stats"},
256ebe
      .default_value = GF_LOGGER_GLUSTER_LOG,
256ebe
@@ -4342,7 +4342,7 @@ struct volume_options options[] = {
256ebe
      .value = {GF_LOGGER_GLUSTER_LOG, GF_LOGGER_SYSLOG}},
256ebe
     {.key = {"brick-logger"},
256ebe
      .type = GF_OPTION_TYPE_STR,
256ebe
-     .op_version = {GD_OP_VERSION_3_6_0},
256ebe
+     .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
      .flags = OPT_FLAG_SETTABLE | OPT_FLAG_DOC,
256ebe
      .tags = {"io-stats"},
256ebe
      .default_value = GF_LOGGER_GLUSTER_LOG,
256ebe
@@ -4354,7 +4354,7 @@ struct volume_options options[] = {
256ebe
      .value = {GF_LOG_FORMAT_NO_MSG_ID, GF_LOG_FORMAT_WITH_MSG_ID}},
256ebe
     {.key = {"client-log-format"},
256ebe
      .type = GF_OPTION_TYPE_STR,
256ebe
-     .op_version = {GD_OP_VERSION_3_6_0},
256ebe
+     .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
      .flags = OPT_FLAG_SETTABLE | OPT_FLAG_CLIENT_OPT | OPT_FLAG_DOC,
256ebe
      .tags = {"io-stats"},
256ebe
      .default_value = GF_LOG_FORMAT_WITH_MSG_ID,
256ebe
@@ -4362,7 +4362,7 @@ struct volume_options options[] = {
256ebe
      .value = {GF_LOG_FORMAT_NO_MSG_ID, GF_LOG_FORMAT_WITH_MSG_ID}},
256ebe
     {.key = {"brick-log-format"},
256ebe
      .type = GF_OPTION_TYPE_STR,
256ebe
-     .op_version = {GD_OP_VERSION_3_6_0},
256ebe
+     .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
      .flags = OPT_FLAG_SETTABLE | OPT_FLAG_DOC,
256ebe
      .tags = {"io-stats"},
256ebe
      .default_value = GF_LOG_FORMAT_WITH_MSG_ID,
256ebe
@@ -4377,7 +4377,7 @@ struct volume_options options[] = {
256ebe
     },
256ebe
     {.key = {"client-log-buf-size"},
256ebe
      .type = GF_OPTION_TYPE_INT,
256ebe
-     .op_version = {GD_OP_VERSION_3_6_0},
256ebe
+     .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
      .flags = OPT_FLAG_SETTABLE | OPT_FLAG_CLIENT_OPT | OPT_FLAG_DOC,
256ebe
      .tags = {"io-stats"},
256ebe
      .min = GF_LOG_LRU_BUFSIZE_MIN,
256ebe
@@ -4388,7 +4388,7 @@ struct volume_options options[] = {
256ebe
                     " the value of the option client-log-flush-timeout."},
256ebe
     {.key = {"brick-log-buf-size"},
256ebe
      .type = GF_OPTION_TYPE_INT,
256ebe
-     .op_version = {GD_OP_VERSION_3_6_0},
256ebe
+     .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
      .flags = OPT_FLAG_SETTABLE | OPT_FLAG_DOC,
256ebe
      .tags = {"io-stats"},
256ebe
      .min = GF_LOG_LRU_BUFSIZE_MIN,
256ebe
@@ -4406,7 +4406,7 @@ struct volume_options options[] = {
256ebe
     },
256ebe
     {.key = {"client-log-flush-timeout"},
256ebe
      .type = GF_OPTION_TYPE_TIME,
256ebe
-     .op_version = {GD_OP_VERSION_3_6_0},
256ebe
+     .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
      .flags = OPT_FLAG_SETTABLE | OPT_FLAG_CLIENT_OPT | OPT_FLAG_DOC,
256ebe
      .tags = {"io-stats"},
256ebe
      .min = GF_LOG_FLUSH_TIMEOUT_MIN,
256ebe
@@ -4417,7 +4417,7 @@ struct volume_options options[] = {
256ebe
                     " the value of the option client-log-flush-timeout."},
256ebe
     {.key = {"brick-log-flush-timeout"},
256ebe
      .type = GF_OPTION_TYPE_TIME,
256ebe
-     .op_version = {GD_OP_VERSION_3_6_0},
256ebe
+     .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
      .flags = OPT_FLAG_SETTABLE | OPT_FLAG_DOC,
256ebe
      .tags = {"io-stats"},
256ebe
      .min = GF_LOG_FLUSH_TIMEOUT_MIN,
256ebe
diff --git a/xlators/features/barrier/src/barrier.c b/xlators/features/barrier/src/barrier.c
256ebe
index a601c7f..0923992 100644
256ebe
--- a/xlators/features/barrier/src/barrier.c
256ebe
+++ b/xlators/features/barrier/src/barrier.c
256ebe
@@ -774,7 +774,7 @@ struct volume_options options[] = {
256ebe
     {.key = {"barrier"},
256ebe
      .type = GF_OPTION_TYPE_BOOL,
256ebe
      .default_value = "disable",
256ebe
-     .op_version = {GD_OP_VERSION_3_6_0},
256ebe
+     .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
      .flags = OPT_FLAG_SETTABLE,
256ebe
      .description = "When \"enabled\", blocks acknowledgements to application "
256ebe
                     "for file operations such as rmdir, rename, unlink, "
256ebe
@@ -784,7 +784,7 @@ struct volume_options options[] = {
256ebe
     {.key = {"barrier-timeout"},
256ebe
      .type = GF_OPTION_TYPE_TIME,
256ebe
      .default_value = BARRIER_TIMEOUT,
256ebe
-     .op_version = {GD_OP_VERSION_3_6_0},
256ebe
+     .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
      .flags = OPT_FLAG_SETTABLE,
256ebe
      .description = "After 'timeout' seconds since the time 'barrier' "
256ebe
                     "option was set to \"on\", acknowledgements to file "
256ebe
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
256ebe
index 38483a1..ad9a572 100644
256ebe
--- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
256ebe
+++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
256ebe
@@ -1195,7 +1195,7 @@ glusterd_op_perform_add_bricks(glusterd_volinfo_t *volinfo, int32_t count,
256ebe
         /* A bricks mount dir is required only by snapshots which were
256ebe
          * introduced in gluster-3.6.0
256ebe
          */
256ebe
-        if (conf->op_version >= GD_OP_VERSION_3_6_0) {
256ebe
+        if (conf->op_version >= GD_OP_VERSION_RHS_3_0) {
256ebe
             brick_mount_dir = NULL;
256ebe
 
256ebe
             snprintf(key, sizeof(key), "brick%d.mount_dir", i);
256ebe
@@ -1729,7 +1729,7 @@ glusterd_op_stage_add_brick(dict_t *dict, char **op_errstr, dict_t *rsp_dict)
256ebe
             /* A bricks mount dir is required only by snapshots which were
256ebe
              * introduced in gluster-3.6.0
256ebe
              */
256ebe
-            if (conf->op_version >= GD_OP_VERSION_3_6_0) {
256ebe
+            if (conf->op_version >= GD_OP_VERSION_RHS_3_0) {
256ebe
                 ret = glusterd_get_brick_mount_dir(
256ebe
                     brickinfo->path, brickinfo->hostname, brickinfo->mount_dir);
256ebe
                 if (ret) {
256ebe
@@ -2085,12 +2085,12 @@ glusterd_op_stage_remove_brick(dict_t *dict, char **op_errstr)
256ebe
             }
256ebe
 
256ebe
             /* Check if the connected clients are all of version
256ebe
-             * glusterfs-3.6 and higher. This is needed to prevent some data
256ebe
+             * RHS-2.1u5 and higher. This is needed to prevent some data
256ebe
              * loss issues that could occur when older clients are connected
256ebe
              * when rebalance is run.
256ebe
              */
256ebe
             ret = glusterd_check_client_op_version_support(
256ebe
-                volname, GD_OP_VERSION_3_6_0, NULL);
256ebe
+                volname, GD_OP_VERSION_RHS_2_1_5, NULL);
256ebe
             if (ret) {
256ebe
                 ret = gf_asprintf(op_errstr,
256ebe
                                   "Volume %s has one or "
256ebe
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
256ebe
index f754b52..387643d 100644
256ebe
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
256ebe
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
256ebe
@@ -763,7 +763,7 @@ glusterd_op_txn_begin(rpcsvc_request_t *req, glusterd_op_t op, void *ctx,
256ebe
     }
256ebe
 
256ebe
     /* Based on the op_version, acquire a cluster or mgmt_v3 lock */
256ebe
-    if (priv->op_version < GD_OP_VERSION_3_6_0) {
256ebe
+    if (priv->op_version < GD_OP_VERSION_RHS_3_0) {
256ebe
         ret = glusterd_lock(MY_UUID);
256ebe
         if (ret) {
256ebe
             gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_GLUSTERD_LOCK_FAIL,
256ebe
@@ -818,7 +818,7 @@ glusterd_op_txn_begin(rpcsvc_request_t *req, glusterd_op_t op, void *ctx,
256ebe
 local_locking_done:
256ebe
     /* If no volname is given as a part of the command, locks will
256ebe
      * not be held, hence sending stage event. */
256ebe
-    if (volname || (priv->op_version < GD_OP_VERSION_3_6_0))
256ebe
+    if (volname || (priv->op_version < GD_OP_VERSION_RHS_3_0))
256ebe
         event_type = GD_OP_EVENT_START_LOCK;
256ebe
     else {
256ebe
         txn_op_info.state.state = GD_OP_STATE_LOCK_SENT;
256ebe
@@ -849,7 +849,7 @@ out:
256ebe
     if (locked && ret) {
256ebe
         /* Based on the op-version, we release the
256ebe
          * cluster or mgmt_v3 lock */
256ebe
-        if (priv->op_version < GD_OP_VERSION_3_6_0)
256ebe
+        if (priv->op_version < GD_OP_VERSION_RHS_3_0)
256ebe
             glusterd_unlock(MY_UUID);
256ebe
         else {
256ebe
             ret = glusterd_mgmt_v3_unlock(volname, MY_UUID, "vol");
256ebe
@@ -4432,12 +4432,12 @@ __glusterd_handle_status_volume(rpcsvc_request_t *req)
256ebe
     }
256ebe
 
256ebe
     if ((cmd & GF_CLI_STATUS_SNAPD) &&
256ebe
-        (conf->op_version < GD_OP_VERSION_3_6_0)) {
256ebe
+        (conf->op_version < GD_OP_VERSION_RHS_3_0)) {
256ebe
         snprintf(err_str, sizeof(err_str),
256ebe
                  "The cluster is operating "
256ebe
                  "at a lesser version than %d. Getting the status of "
256ebe
                  "snapd is not allowed in this state",
256ebe
-                 GD_OP_VERSION_3_6_0);
256ebe
+                 GD_OP_VERSION_RHS_3_0);
256ebe
         ret = -1;
256ebe
         goto out;
256ebe
     }
256ebe
@@ -4459,7 +4459,7 @@ __glusterd_handle_status_volume(rpcsvc_request_t *req)
256ebe
                  "The cluster is operating "
256ebe
                  "at a lesser version than %d. Getting the status of "
256ebe
                  "tierd is not allowed in this state",
256ebe
-                 GD_OP_VERSION_3_6_0);
256ebe
+                 GD_OP_VERSION_RHS_3_0);
256ebe
         ret = -1;
256ebe
         goto out;
256ebe
     }
256ebe
@@ -6430,7 +6430,7 @@ __glusterd_peer_rpc_notify(struct rpc_clnt *rpc, void *mydata,
256ebe
                      glusterd_friend_sm_state_name_get(peerinfo->state.state));
256ebe
 
256ebe
             if (peerinfo->connected) {
256ebe
-                if (conf->op_version < GD_OP_VERSION_3_6_0) {
256ebe
+                if (conf->op_version < GD_OP_VERSION_RHS_3_0) {
256ebe
                     glusterd_get_lock_owner(&uuid);
256ebe
                     if (!gf_uuid_is_null(uuid) &&
256ebe
                         !gf_uuid_compare(peerinfo->uuid, uuid))
256ebe
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
256ebe
index 6495a9d..dd3f9eb 100644
256ebe
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
256ebe
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
256ebe
@@ -194,7 +194,7 @@ glusterd_generate_txn_id(dict_t *dict, uuid_t **txn_id)
256ebe
     if (!*txn_id)
256ebe
         goto out;
256ebe
 
256ebe
-    if (priv->op_version < GD_OP_VERSION_3_6_0)
256ebe
+    if (priv->op_version < GD_OP_VERSION_RHS_3_0)
256ebe
         gf_uuid_copy(**txn_id, priv->global_txn_id);
256ebe
     else
256ebe
         gf_uuid_generate(**txn_id);
256ebe
@@ -1864,12 +1864,12 @@ glusterd_op_stage_status_volume(dict_t *dict, char **op_errstr)
256ebe
     }
256ebe
 
256ebe
     if ((cmd & GF_CLI_STATUS_SNAPD) &&
256ebe
-        (priv->op_version < GD_OP_VERSION_3_6_0)) {
256ebe
+        (priv->op_version < GD_OP_VERSION_RHS_3_0)) {
256ebe
         snprintf(msg, sizeof(msg),
256ebe
                  "The cluster is operating at "
256ebe
                  "version less than %d. Getting the "
256ebe
                  "status of snapd is not allowed in this state.",
256ebe
-                 GD_OP_VERSION_3_6_0);
256ebe
+                 GD_OP_VERSION_RHS_3_0);
256ebe
         ret = -1;
256ebe
         goto out;
256ebe
     }
256ebe
@@ -3877,7 +3877,7 @@ glusterd_op_ac_send_lock(glusterd_op_sm_event_t *event, void *ctx)
256ebe
             continue;
256ebe
 
256ebe
         /* Based on the op_version, acquire a cluster or mgmt_v3 lock */
256ebe
-        if (priv->op_version < GD_OP_VERSION_3_6_0) {
256ebe
+        if (priv->op_version < GD_OP_VERSION_RHS_3_0) {
256ebe
             proc = &peerinfo->mgmt->proctable[GLUSTERD_MGMT_CLUSTER_LOCK];
256ebe
             if (proc->fn) {
256ebe
                 ret = proc->fn(NULL, this, peerinfo);
256ebe
@@ -3980,7 +3980,7 @@ glusterd_op_ac_send_unlock(glusterd_op_sm_event_t *event, void *ctx)
256ebe
             continue;
256ebe
         /* Based on the op_version,
256ebe
          * release the cluster or mgmt_v3 lock */
256ebe
-        if (priv->op_version < GD_OP_VERSION_3_6_0) {
256ebe
+        if (priv->op_version < GD_OP_VERSION_RHS_3_0) {
256ebe
             proc = &peerinfo->mgmt->proctable[GLUSTERD_MGMT_CLUSTER_UNLOCK];
256ebe
             if (proc->fn) {
256ebe
                 ret = proc->fn(NULL, this, peerinfo);
256ebe
@@ -4957,7 +4957,7 @@ glusterd_op_modify_op_ctx(glusterd_op_t op, void *ctx)
256ebe
             count = brick_index_max + other_count + 1;
256ebe
 
256ebe
             /*
256ebe
-             * a glusterd lesser than version 3.7 will be sending the
256ebe
+             * a glusterd lesser than version RHS-3.0.4 will be sending the
256ebe
              * rdma port in older key. Changing that value from here
256ebe
              * to support backward compatibility
256ebe
              */
256ebe
@@ -4977,7 +4977,7 @@ glusterd_op_modify_op_ctx(glusterd_op_t op, void *ctx)
256ebe
             ret = glusterd_volinfo_find(volname, &volinfo);
256ebe
             if (ret)
256ebe
                 goto out;
256ebe
-            if (conf->op_version < GD_OP_VERSION_3_7_0 &&
256ebe
+            if (conf->op_version < GD_OP_VERSION_RHS_3_0_4 &&
256ebe
                 volinfo->transport_type == GF_TRANSPORT_RDMA) {
256ebe
                 ret = glusterd_op_modify_port_key(op_ctx, brick_index_max);
256ebe
                 if (ret)
256ebe
@@ -5576,7 +5576,7 @@ glusterd_op_txn_complete(uuid_t *txn_id)
256ebe
     glusterd_op_clear_errstr();
256ebe
 
256ebe
     /* Based on the op-version, we release the cluster or mgmt_v3 lock */
256ebe
-    if (priv->op_version < GD_OP_VERSION_3_6_0) {
256ebe
+    if (priv->op_version < GD_OP_VERSION_RHS_3_0) {
256ebe
         ret = glusterd_unlock(MY_UUID);
256ebe
         /* unlock can't/shouldn't fail here!! */
256ebe
         if (ret)
256ebe
diff --git a/xlators/mgmt/glusterd/src/glusterd-peer-utils.c b/xlators/mgmt/glusterd/src/glusterd-peer-utils.c
256ebe
index 5b5959e..f24c86e 100644
256ebe
--- a/xlators/mgmt/glusterd/src/glusterd-peer-utils.c
256ebe
+++ b/xlators/mgmt/glusterd/src/glusterd-peer-utils.c
256ebe
@@ -547,7 +547,7 @@ out:
256ebe
  * @prefix. All the parameters are compulsory.
256ebe
  *
256ebe
  * The complete address list is added to the dict only if the cluster op-version
256ebe
- * is >= GD_OP_VERSION_3_6_0
256ebe
+ * is >= GD_OP_VERSION_3_7_0
256ebe
  */
256ebe
 int
256ebe
 gd_add_friend_to_dict(glusterd_peerinfo_t *friend, dict_t *dict,
256ebe
@@ -593,7 +593,7 @@ gd_add_friend_to_dict(glusterd_peerinfo_t *friend, dict_t *dict,
256ebe
         goto out;
256ebe
     }
256ebe
 
256ebe
-    if (conf->op_version < GD_OP_VERSION_3_6_0) {
256ebe
+    if (conf->op_version < GD_OP_VERSION_3_7_0) {
256ebe
         ret = 0;
256ebe
         goto out;
256ebe
     }
256ebe
@@ -778,7 +778,7 @@ gd_update_peerinfo_from_dict(glusterd_peerinfo_t *peerinfo, dict_t *dict,
256ebe
         GF_FREE(peerinfo->hostname);
256ebe
     peerinfo->hostname = gf_strdup(hostname);
256ebe
 
256ebe
-    if (conf->op_version < GD_OP_VERSION_3_6_0) {
256ebe
+    if (conf->op_version < GD_OP_VERSION_3_7_0) {
256ebe
         ret = 0;
256ebe
         goto out;
256ebe
     }
256ebe
@@ -894,7 +894,7 @@ gd_add_peer_hostnames_to_dict(glusterd_peerinfo_t *peerinfo, dict_t *dict,
256ebe
     conf = this->private;
256ebe
     GF_VALIDATE_OR_GOTO(this->name, (conf != NULL), out);
256ebe
 
256ebe
-    if (conf->op_version < GD_OP_VERSION_3_6_0) {
256ebe
+    if (conf->op_version < GD_OP_VERSION_3_7_0) {
256ebe
         ret = 0;
256ebe
         goto out;
256ebe
     }
256ebe
diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
256ebe
index 34b0294..6365b6e 100644
256ebe
--- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c
256ebe
+++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
256ebe
@@ -792,13 +792,13 @@ glusterd_mgmt_v3_op_stage_rebalance(dict_t *dict, char **op_errstr)
256ebe
         case GF_DEFRAG_CMD_START:
256ebe
         case GF_DEFRAG_CMD_START_LAYOUT_FIX:
256ebe
             /* Check if the connected clients are all of version
256ebe
-             * glusterfs-3.6 and higher. This is needed to prevent some data
256ebe
+             * RHS-2.1u5 and higher. This is needed to prevent some data
256ebe
              * loss issues that could occur when older clients are connected
256ebe
              * when rebalance is run. This check can be bypassed by using
256ebe
              * 'force'
256ebe
              */
256ebe
             ret = glusterd_check_client_op_version_support(
256ebe
-                volname, GD_OP_VERSION_3_6_0, NULL);
256ebe
+                volname, GD_OP_VERSION_RHS_2_1_5, NULL);
256ebe
             if (ret) {
256ebe
                 ret = gf_asprintf(op_errstr,
256ebe
                                   "Volume %s has one or "
256ebe
diff --git a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
256ebe
index ca1de1a..0615081 100644
256ebe
--- a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
256ebe
+++ b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
256ebe
@@ -297,7 +297,7 @@ glusterd_op_stage_replace_brick(dict_t *dict, char **op_errstr,
256ebe
         if (ret)
256ebe
             goto out;
256ebe
 
256ebe
-    } else if (priv->op_version >= GD_OP_VERSION_3_6_0) {
256ebe
+    } else if (priv->op_version >= GD_OP_VERSION_RHS_3_0) {
256ebe
         /* A bricks mount dir is required only by snapshots which were
256ebe
          * introduced in gluster-3.6.0
256ebe
          */
256ebe
@@ -396,7 +396,7 @@ glusterd_op_perform_replace_brick(glusterd_volinfo_t *volinfo, char *old_brick,
256ebe
     /* A bricks mount dir is required only by snapshots which were
256ebe
      * introduced in gluster-3.6.0
256ebe
      */
256ebe
-    if (conf->op_version >= GD_OP_VERSION_3_6_0) {
256ebe
+    if (conf->op_version >= GD_OP_VERSION_RHS_3_0) {
256ebe
         ret = dict_get_strn(dict, "brick1.mount_dir", SLEN("brick1.mount_dir"),
256ebe
                             &brick_mount_dir);
256ebe
         if (ret) {
256ebe
diff --git a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
256ebe
index 728781d..4ec9700 100644
256ebe
--- a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
256ebe
+++ b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
256ebe
@@ -288,11 +288,11 @@ __glusterd_probe_cbk(struct rpc_req *req, struct iovec *iov, int count,
256ebe
      * we need to add the new hostname to the peer.
256ebe
      *
256ebe
      * This addition should only be done for cluster op-version >=
256ebe
-     * GD_OP_VERSION_3_6_0 as address lists are only supported from then on.
256ebe
+     * GD_OP_VERSION_3_7_0 as address lists are only supported from then on.
256ebe
      * Also, this update should only be done when an explicit CLI probe
256ebe
      * command was used to begin the probe process.
256ebe
      */
256ebe
-    if ((conf->op_version >= GD_OP_VERSION_3_6_0) &&
256ebe
+    if ((conf->op_version >= GD_OP_VERSION_3_7_0) &&
256ebe
         (gf_uuid_compare(rsp.uuid, peerinfo->uuid) == 0)) {
256ebe
         ctx = ((call_frame_t *)myframe)->local;
256ebe
         /* Presence of ctx->req implies this probe was started by a cli
256ebe
@@ -1544,7 +1544,7 @@ glusterd_rpc_friend_add(call_frame_t *frame, xlator_t *this, void *data)
256ebe
         goto out;
256ebe
     }
256ebe
 
256ebe
-    if (priv->op_version >= GD_OP_VERSION_3_6_0) {
256ebe
+    if (priv->op_version >= GD_OP_VERSION_RHS_3_0) {
256ebe
         ret = glusterd_add_missed_snaps_to_export_dict(peer_data);
256ebe
         if (ret) {
256ebe
             gf_msg(this->name, GF_LOG_ERROR, 0,
256ebe
diff --git a/xlators/mgmt/glusterd/src/glusterd-sm.c b/xlators/mgmt/glusterd/src/glusterd-sm.c
256ebe
index 73a11a3..54a7bd1 100644
256ebe
--- a/xlators/mgmt/glusterd/src/glusterd-sm.c
256ebe
+++ b/xlators/mgmt/glusterd/src/glusterd-sm.c
256ebe
@@ -955,7 +955,7 @@ glusterd_ac_handle_friend_add_req(glusterd_friend_sm_event_t *event, void *ctx)
256ebe
 
256ebe
         /* Compare missed_snapshot list with the peer *
256ebe
          * if volume comparison is successful */
256ebe
-        if ((op_ret == 0) && (conf->op_version >= GD_OP_VERSION_3_6_0)) {
256ebe
+        if ((op_ret == 0) && (conf->op_version >= GD_OP_VERSION_RHS_3_0)) {
256ebe
             ret = glusterd_import_friend_missed_snap_list(ev_ctx->vols);
256ebe
             if (ret) {
256ebe
                 gf_msg(this->name, GF_LOG_ERROR, 0,
256ebe
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
256ebe
index 1ece374..2958443 100644
256ebe
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
256ebe
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
256ebe
@@ -470,7 +470,7 @@ gd_add_brick_snap_details_to_dict(dict_t *dict, char *prefix,
256ebe
     GF_VALIDATE_OR_GOTO(this->name, (prefix != NULL), out);
256ebe
     GF_VALIDATE_OR_GOTO(this->name, (brickinfo != NULL), out);
256ebe
 
256ebe
-    if (conf->op_version < GD_OP_VERSION_3_6_0) {
256ebe
+    if (conf->op_version < GD_OP_VERSION_RHS_3_0) {
256ebe
         ret = 0;
256ebe
         goto out;
256ebe
     }
256ebe
@@ -547,7 +547,7 @@ gd_add_vol_snap_details_to_dict(dict_t *dict, char *prefix,
256ebe
     GF_VALIDATE_OR_GOTO(this->name, (volinfo != NULL), out);
256ebe
     GF_VALIDATE_OR_GOTO(this->name, (prefix != NULL), out);
256ebe
 
256ebe
-    if (conf->op_version < GD_OP_VERSION_3_6_0) {
256ebe
+    if (conf->op_version < GD_OP_VERSION_RHS_3_0) {
256ebe
         ret = 0;
256ebe
         goto out;
256ebe
     }
256ebe
@@ -846,7 +846,7 @@ gd_import_new_brick_snap_details(dict_t *dict, char *prefix,
256ebe
     GF_VALIDATE_OR_GOTO(this->name, (prefix != NULL), out);
256ebe
     GF_VALIDATE_OR_GOTO(this->name, (brickinfo != NULL), out);
256ebe
 
256ebe
-    if (conf->op_version < GD_OP_VERSION_3_6_0) {
256ebe
+    if (conf->op_version < GD_OP_VERSION_RHS_3_0) {
256ebe
         ret = 0;
256ebe
         goto out;
256ebe
     }
256ebe
@@ -903,8 +903,8 @@ out:
256ebe
  * Imports the snapshot details of a volume if required and available
256ebe
  *
256ebe
  * Snapshot details will be imported only if cluster.op_version is greater than
256ebe
- * or equal to GD_OP_VERSION_3_6_0, the op-version from which volume snapshot is
256ebe
- * supported.
256ebe
+ * or equal to GD_OP_VERSION_RHS_3_0, the op-version from which volume snapshot
256ebe
+ * is supported.
256ebe
  */
256ebe
 int
256ebe
 gd_import_volume_snap_details(dict_t *dict, glusterd_volinfo_t *volinfo,
256ebe
@@ -928,7 +928,7 @@ gd_import_volume_snap_details(dict_t *dict, glusterd_volinfo_t *volinfo,
256ebe
     GF_VALIDATE_OR_GOTO(this->name, (prefix != NULL), out);
256ebe
     GF_VALIDATE_OR_GOTO(this->name, (volname != NULL), out);
256ebe
 
256ebe
-    if (conf->op_version < GD_OP_VERSION_3_6_0) {
256ebe
+    if (conf->op_version < GD_OP_VERSION_RHS_3_0) {
256ebe
         ret = 0;
256ebe
         goto out;
256ebe
     }
256ebe
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
256ebe
index 8f5cd6d..c56be91 100644
256ebe
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
256ebe
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
256ebe
@@ -9345,14 +9345,14 @@ glusterd_handle_snapshot_fn(rpcsvc_request_t *req)
256ebe
         goto out;
256ebe
     }
256ebe
 
256ebe
-    if (conf->op_version < GD_OP_VERSION_3_6_0) {
256ebe
+    if (conf->op_version < GD_OP_VERSION_RHS_3_0) {
256ebe
         snprintf(err_str, sizeof(err_str),
256ebe
                  "Cluster operating version"
256ebe
                  " is lesser than the supported version "
256ebe
                  "for a snapshot");
256ebe
         op_errno = EG_OPNOTSUP;
256ebe
         gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_UNSUPPORTED_VERSION,
256ebe
-               "%s (%d < %d)", err_str, conf->op_version, GD_OP_VERSION_3_6_0);
256ebe
+               "%s (%d < %d)", err_str, conf->op_version, GD_OP_VERSION_RHS_3_0);
256ebe
         ret = -1;
256ebe
         goto out;
256ebe
     }
256ebe
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
256ebe
index 7acea05..64447e7 100644
256ebe
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
256ebe
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
256ebe
@@ -313,7 +313,7 @@ gd_store_brick_snap_details_write(int fd, glusterd_brickinfo_t *brickinfo)
256ebe
     GF_VALIDATE_OR_GOTO(this->name, (fd > 0), out);
256ebe
     GF_VALIDATE_OR_GOTO(this->name, (brickinfo != NULL), out);
256ebe
 
256ebe
-    if (conf->op_version < GD_OP_VERSION_3_6_0) {
256ebe
+    if (conf->op_version < GD_OP_VERSION_RHS_3_0) {
256ebe
         ret = 0;
256ebe
         goto out;
256ebe
     }
256ebe
@@ -813,7 +813,7 @@ glusterd_volume_write_snap_details(int fd, glusterd_volinfo_t *volinfo)
256ebe
     GF_VALIDATE_OR_GOTO(this->name, (fd > 0), out);
256ebe
     GF_VALIDATE_OR_GOTO(this->name, (volinfo != NULL), out);
256ebe
 
256ebe
-    if (conf->op_version < GD_OP_VERSION_3_6_0) {
256ebe
+    if (conf->op_version < GD_OP_VERSION_RHS_3_0) {
256ebe
         ret = 0;
256ebe
         goto out;
256ebe
     }
256ebe
@@ -967,7 +967,7 @@ glusterd_volume_exclude_options_write(int fd, glusterd_volinfo_t *volinfo)
256ebe
             goto out;
256ebe
     }
256ebe
 
256ebe
-    if (conf->op_version >= GD_OP_VERSION_3_6_0) {
256ebe
+    if (conf->op_version >= GD_OP_VERSION_RHS_3_0) {
256ebe
         snprintf(buf, sizeof(buf), "%d", volinfo->disperse_count);
256ebe
         ret = gf_store_save_value(fd, GLUSTERD_STORE_KEY_VOL_DISPERSE_CNT, buf);
256ebe
         if (ret)
256ebe
@@ -2502,7 +2502,7 @@ glusterd_store_retrieve_snapd(glusterd_volinfo_t *volinfo)
256ebe
     conf = THIS->private;
256ebe
     GF_ASSERT(volinfo);
256ebe
 
256ebe
-    if (conf->op_version < GD_OP_VERSION_3_6_0) {
256ebe
+    if (conf->op_version < GD_OP_VERSION_RHS_3_0) {
256ebe
         ret = 0;
256ebe
         goto out;
256ebe
     }
256ebe
@@ -2510,15 +2510,16 @@ glusterd_store_retrieve_snapd(glusterd_volinfo_t *volinfo)
256ebe
     /*
256ebe
      * This is needed for upgrade situations. Say a volume is created with
256ebe
      * older version of glusterfs and upgraded to a glusterfs version equal
256ebe
-     * to or greater than GD_OP_VERSION_3_6_0. The older glusterd would not
256ebe
-     * have created the snapd.info file related to snapshot daemon for user
256ebe
-     * serviceable snapshots. So as part of upgrade when the new glusterd
256ebe
-     * starts, as part of restore (restoring the volume to be precise), it
256ebe
-     * tries to snapd related info from snapd.info file. But since there was
256ebe
-     * no such file till now, the restore operation fails. Thus, to prevent
256ebe
-     * it from happening check whether user serviceable snapshots features
256ebe
-     * is enabled before restoring snapd. If its disabled, then simply
256ebe
-     * exit by returning success (without even checking for the snapd.info).
256ebe
+     * to or greater than GD_OP_VERSION_RHS_3_0. The older glusterd would
256ebe
+     * not have created the snapd.info file related to snapshot daemon for
256ebe
+     * user serviceable snapshots. So as part of upgrade when the new
256ebe
+     * glusterd starts, as part of restore (restoring the volume to be
256ebe
+     * precise), it tries to snapd related info from snapd.info file. But
256ebe
+     * since there was no such file till now, the restore operation fails.
256ebe
+     * Thus, to prevent it from happening check whether user serviceable
256ebe
+     * snapshots features is enabled before restoring snapd. If its
256ebe
+     * disbaled, then simply exit by returning success (without even
256ebe
+     * checking for the snapd.info).
256ebe
      */
256ebe
 
256ebe
     if (!dict_get_str_boolean(volinfo->dict, "features.uss", _gf_false)) {
256ebe
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c
256ebe
index 45b221c..1741cf8 100644
256ebe
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
256ebe
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
256ebe
@@ -1827,7 +1827,7 @@ gd_sync_task_begin(dict_t *op_ctx, rpcsvc_request_t *req)
256ebe
         goto out;
256ebe
     }
256ebe
 
256ebe
-    if (conf->op_version < GD_OP_VERSION_3_6_0)
256ebe
+    if (conf->op_version < GD_OP_VERSION_RHS_3_0)
256ebe
         cluster_lock = _gf_true;
256ebe
 
256ebe
     /* Based on the op_version, acquire a cluster or mgmt_v3 lock */
256ebe
diff --git a/xlators/mgmt/glusterd/src/glusterd-tier.c b/xlators/mgmt/glusterd/src/glusterd-tier.c
256ebe
index dd86cf5..4dc0d44 100644
256ebe
--- a/xlators/mgmt/glusterd/src/glusterd-tier.c
256ebe
+++ b/xlators/mgmt/glusterd/src/glusterd-tier.c
256ebe
@@ -867,7 +867,8 @@ glusterd_op_stage_tier(dict_t *dict, char **op_errstr, dict_t *rsp_dict)
256ebe
      * when rebalance is run. This check can be bypassed by using
256ebe
      * 'force'
256ebe
      */
256ebe
-    ret = glusterd_check_client_op_version_support(volname, GD_OP_VERSION_3_6_0,
256ebe
+    ret = glusterd_check_client_op_version_support(volname,
256ebe
+                                                   GD_OP_VERSION_RHS_3_0,
256ebe
                                                    NULL);
256ebe
     if (ret) {
256ebe
         ret = gf_asprintf(op_errstr,
256ebe
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
256ebe
index 8bbd795..52b83ec 100644
256ebe
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
256ebe
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
256ebe
@@ -12226,10 +12226,10 @@ gd_update_volume_op_versions(glusterd_volinfo_t *volinfo)
256ebe
     }
256ebe
 
256ebe
     if (volinfo->type == GF_CLUSTER_TYPE_DISPERSE) {
256ebe
-        if (volinfo->op_version < GD_OP_VERSION_3_6_0)
256ebe
-            volinfo->op_version = GD_OP_VERSION_3_6_0;
256ebe
-        if (volinfo->client_op_version < GD_OP_VERSION_3_6_0)
256ebe
-            volinfo->client_op_version = GD_OP_VERSION_3_6_0;
256ebe
+        if (volinfo->op_version < GD_OP_VERSION_3_7_0)
256ebe
+            volinfo->op_version = GD_OP_VERSION_3_7_0;
256ebe
+        if (volinfo->client_op_version < GD_OP_VERSION_3_7_0)
256ebe
+            volinfo->client_op_version = GD_OP_VERSION_3_7_0;
256ebe
     }
256ebe
 
256ebe
     return;
256ebe
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
256ebe
index 7cfba3d..86ef470 100644
256ebe
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
256ebe
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
256ebe
@@ -1389,7 +1389,7 @@ glusterd_op_stage_create_volume(dict_t *dict, char **op_errstr,
256ebe
             /* A bricks mount dir is required only by snapshots which were
256ebe
              * introduced in gluster-3.6.0
256ebe
              */
256ebe
-            if (priv->op_version >= GD_OP_VERSION_3_6_0) {
256ebe
+            if (priv->op_version >= GD_OP_VERSION_RHS_3_0) {
256ebe
                 ret = glusterd_get_brick_mount_dir(brick_info->path,
256ebe
                                                    brick_info->hostname,
256ebe
                                                    brick_info->mount_dir);
256ebe
@@ -1698,7 +1698,7 @@ glusterd_op_stage_start_volume(dict_t *dict, char **op_errstr, dict_t *rsp_dict)
256ebe
         /* A bricks mount dir is required only by snapshots which were
256ebe
          * introduced in gluster-3.6.0
256ebe
          */
256ebe
-        if (priv->op_version >= GD_OP_VERSION_3_6_0) {
256ebe
+        if (priv->op_version >= GD_OP_VERSION_RHS_3_0) {
256ebe
             if (strlen(brickinfo->mount_dir) < 1) {
256ebe
                 ret = glusterd_get_brick_mount_dir(
256ebe
                     brickinfo->path, brickinfo->hostname, brickinfo->mount_dir);
256ebe
@@ -2395,10 +2395,10 @@ glusterd_op_create_volume(dict_t *dict, char **op_errstr)
256ebe
                    volname);
256ebe
             goto out;
256ebe
         }
256ebe
-        if (priv->op_version < GD_OP_VERSION_3_6_0) {
256ebe
+        if (priv->op_version < GD_OP_VERSION_3_7_0) {
256ebe
             gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_UNSUPPORTED_VERSION,
256ebe
                    "Disperse volume "
256ebe
-                   "needs op-version 3.6.0 or higher");
256ebe
+                   "needs op-version 30700 or higher");
256ebe
             ret = -1;
256ebe
             goto out;
256ebe
         }
256ebe
@@ -2494,7 +2494,7 @@ glusterd_op_create_volume(dict_t *dict, char **op_errstr)
256ebe
         /* A bricks mount dir is required only by snapshots which were
256ebe
          * introduced in gluster-3.6.0
256ebe
          */
256ebe
-        if (priv->op_version >= GD_OP_VERSION_3_6_0) {
256ebe
+        if (priv->op_version >= GD_OP_VERSION_RHS_3_0) {
256ebe
             brick_mount_dir = NULL;
256ebe
             ret = snprintf(key, sizeof(key), "brick%d.mount_dir", i);
256ebe
             ret = dict_get_strn(dict, key, ret, &brick_mount_dir);
256ebe
@@ -2703,7 +2703,7 @@ glusterd_op_start_volume(dict_t *dict, char **op_errstr)
256ebe
     /* A bricks mount dir is required only by snapshots which were
256ebe
      * introduced in gluster-3.6.0
256ebe
      */
256ebe
-    if (conf->op_version >= GD_OP_VERSION_3_6_0) {
256ebe
+    if (conf->op_version >= GD_OP_VERSION_RHS_3_0) {
256ebe
         cds_list_for_each_entry(brickinfo, &volinfo->bricks, brick_list)
256ebe
         {
256ebe
             brick_count++;
256ebe
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
256ebe
index dc58e11..d07fc10 100644
256ebe
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
256ebe
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
256ebe
@@ -807,7 +807,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
     {.key = "cluster.subvols-per-directory",
256ebe
      .voltype = "cluster/distribute",
256ebe
      .option = "directory-layout-spread",
256ebe
-     .op_version = 2,
256ebe
+     .op_version = 1,
256ebe
      .validate_fn = validate_subvols_per_directory,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {.key = "cluster.readdir-optimize",
256ebe
@@ -817,25 +817,25 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
     {.key = "cluster.rsync-hash-regex",
256ebe
      .voltype = "cluster/distribute",
256ebe
      .type = NO_DOC,
256ebe
-     .op_version = 3,
256ebe
+     .op_version = 2,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {.key = "cluster.extra-hash-regex",
256ebe
      .voltype = "cluster/distribute",
256ebe
      .type = NO_DOC,
256ebe
-     .op_version = 3,
256ebe
+     .op_version = 2,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {.key = "cluster.dht-xattr-name",
256ebe
      .voltype = "cluster/distribute",
256ebe
      .option = "xattr-name",
256ebe
      .type = NO_DOC,
256ebe
-     .op_version = 3,
256ebe
+     .op_version = 2,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {
256ebe
         .key = "cluster.randomize-hash-range-by-gfid",
256ebe
         .voltype = "cluster/distribute",
256ebe
         .option = "randomize-hash-range-by-gfid",
256ebe
         .type = NO_DOC,
256ebe
-        .op_version = GD_OP_VERSION_3_6_0,
256ebe
+        .op_version = GD_OP_VERSION_3_7_0,
256ebe
         .flags = VOLOPT_FLAG_CLIENT_OPT,
256ebe
     },
256ebe
     {
256ebe
@@ -877,12 +877,12 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
      .voltype = "cluster/nufa",
256ebe
      .option = "local-volume-name",
256ebe
      .type = NO_DOC,
256ebe
-     .op_version = 3,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {
256ebe
         .key = "cluster.weighted-rebalance",
256ebe
         .voltype = "cluster/distribute",
256ebe
-        .op_version = GD_OP_VERSION_3_6_0,
256ebe
+        .op_version = GD_OP_VERSION_3_7_0,
256ebe
     },
256ebe
 
256ebe
     /* Switch xlator options (Distribute special case) */
256ebe
@@ -890,13 +890,13 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
      .voltype = "cluster/distribute",
256ebe
      .option = "!switch",
256ebe
      .type = NO_DOC,
256ebe
-     .op_version = 3,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {.key = "cluster.switch-pattern",
256ebe
      .voltype = "cluster/switch",
256ebe
      .option = "pattern.switch.case",
256ebe
      .type = NO_DOC,
256ebe
-     .op_version = 3,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
 
256ebe
     /* AFR xlator options */
256ebe
@@ -1014,16 +1014,16 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {.key = "cluster.readdir-failover",
256ebe
      .voltype = "cluster/replicate",
256ebe
-     .op_version = 2,
256ebe
+     .op_version = 1,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {.key = "cluster.ensure-durability",
256ebe
      .voltype = "cluster/replicate",
256ebe
-     .op_version = 3,
256ebe
+     .op_version = 2,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {.key = "cluster.consistent-metadata",
256ebe
      .voltype = "cluster/replicate",
256ebe
      .type = DOC,
256ebe
-     .op_version = GD_OP_VERSION_3_7_0,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0_4,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {.key = "cluster.heal-wait-queue-length",
256ebe
      .voltype = "cluster/replicate",
256ebe
@@ -1080,45 +1080,45 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
         .key = "diagnostics.brick-logger",
256ebe
         .voltype = "debug/io-stats",
256ebe
         .option = "!logger",
256ebe
-        .op_version = GD_OP_VERSION_3_6_0,
256ebe
+        .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
     },
256ebe
     {.key = "diagnostics.client-logger",
256ebe
      .voltype = "debug/io-stats",
256ebe
      .option = "!logger",
256ebe
-     .op_version = GD_OP_VERSION_3_6_0,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {
256ebe
         .key = "diagnostics.brick-log-format",
256ebe
         .voltype = "debug/io-stats",
256ebe
         .option = "!log-format",
256ebe
-        .op_version = GD_OP_VERSION_3_6_0,
256ebe
+        .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
     },
256ebe
     {.key = "diagnostics.client-log-format",
256ebe
      .voltype = "debug/io-stats",
256ebe
      .option = "!log-format",
256ebe
-     .op_version = GD_OP_VERSION_3_6_0,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {
256ebe
         .key = "diagnostics.brick-log-buf-size",
256ebe
         .voltype = "debug/io-stats",
256ebe
         .option = "!log-buf-size",
256ebe
-        .op_version = GD_OP_VERSION_3_6_0,
256ebe
+        .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
     },
256ebe
     {.key = "diagnostics.client-log-buf-size",
256ebe
      .voltype = "debug/io-stats",
256ebe
      .option = "!log-buf-size",
256ebe
-     .op_version = GD_OP_VERSION_3_6_0,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {
256ebe
         .key = "diagnostics.brick-log-flush-timeout",
256ebe
         .voltype = "debug/io-stats",
256ebe
         .option = "!log-flush-timeout",
256ebe
-        .op_version = GD_OP_VERSION_3_6_0,
256ebe
+        .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
     },
256ebe
     {.key = "diagnostics.client-log-flush-timeout",
256ebe
      .voltype = "debug/io-stats",
256ebe
      .option = "!log-flush-timeout",
256ebe
-     .op_version = GD_OP_VERSION_3_6_0,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {.key = "diagnostics.stats-dump-interval",
256ebe
      .voltype = "debug/io-stats",
256ebe
@@ -1203,6 +1203,10 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
      .voltype = "performance/io-threads",
256ebe
      .option = "pass-through",
256ebe
      .op_version = GD_OP_VERSION_4_1_0},
256ebe
+    {.key         = "performance.least-rate-limit",
256ebe
+     .voltype     = "performance/io-threads",
256ebe
+     .op_version  = 1
256ebe
+    },
256ebe
 
256ebe
     /* Other perf xlators' options */
256ebe
     {.key = "performance.io-cache-pass-through",
256ebe
@@ -1237,12 +1241,12 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
     {.key = "performance.nfs.flush-behind",
256ebe
      .voltype = "performance/write-behind",
256ebe
      .option = "flush-behind",
256ebe
-     .op_version = 1,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {.key = "performance.write-behind-window-size",
256ebe
      .voltype = "performance/write-behind",
256ebe
      .option = "cache-size",
256ebe
-     .op_version = 1,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {
256ebe
         .key = "performance.resync-failed-syncs-after-fsync",
256ebe
@@ -1262,27 +1266,27 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
     {.key = "performance.nfs.write-behind-window-size",
256ebe
      .voltype = "performance/write-behind",
256ebe
      .option = "cache-size",
256ebe
-     .op_version = 1,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {.key = "performance.strict-o-direct",
256ebe
      .voltype = "performance/write-behind",
256ebe
      .option = "strict-O_DIRECT",
256ebe
-     .op_version = 2,
256ebe
+     .op_version = 1,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {.key = "performance.nfs.strict-o-direct",
256ebe
      .voltype = "performance/write-behind",
256ebe
      .option = "strict-O_DIRECT",
256ebe
-     .op_version = 2,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {.key = "performance.strict-write-ordering",
256ebe
      .voltype = "performance/write-behind",
256ebe
      .option = "strict-write-ordering",
256ebe
-     .op_version = 2,
256ebe
+     .op_version = 1,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {.key = "performance.nfs.strict-write-ordering",
256ebe
      .voltype = "performance/write-behind",
256ebe
      .option = "strict-write-ordering",
256ebe
-     .op_version = 2,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {.key = "performance.write-behind-trickling-writes",
256ebe
      .voltype = "performance/write-behind",
256ebe
@@ -1302,12 +1306,12 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
     {.key = "performance.lazy-open",
256ebe
      .voltype = "performance/open-behind",
256ebe
      .option = "lazy-open",
256ebe
-     .op_version = 3,
256ebe
+     .op_version = 2,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {.key = "performance.read-after-open",
256ebe
      .voltype = "performance/open-behind",
256ebe
      .option = "read-after-open",
256ebe
-     .op_version = 3,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {
256ebe
         .key = "performance.open-behind-pass-through",
256ebe
@@ -1389,22 +1393,22 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
      .voltype = "encryption/crypt",
256ebe
      .option = "!feat",
256ebe
      .value = "off",
256ebe
-     .op_version = 3,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .description = "enable/disable client-side encryption for "
256ebe
                     "the volume.",
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT},
256ebe
 
256ebe
     {.key = "encryption.master-key",
256ebe
      .voltype = "encryption/crypt",
256ebe
-     .op_version = 3,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {.key = "encryption.data-key-size",
256ebe
      .voltype = "encryption/crypt",
256ebe
-     .op_version = 3,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {.key = "encryption.block-size",
256ebe
      .voltype = "encryption/crypt",
256ebe
-     .op_version = 3,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
 
256ebe
     /* Client xlator options */
256ebe
@@ -1431,7 +1435,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
     {.key = "network.remote-dio",
256ebe
      .voltype = "protocol/client",
256ebe
      .option = "filter-O_DIRECT",
256ebe
-     .op_version = 2,
256ebe
+     .op_version = 1,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT},
256ebe
     {
256ebe
         .key = "client.own-thread",
256ebe
@@ -1443,7 +1447,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
     {
256ebe
         .key = "client.event-threads",
256ebe
         .voltype = "protocol/client",
256ebe
-        .op_version = GD_OP_VERSION_3_7_0,
256ebe
+        .op_version = GD_OP_VERSION_RHS_3_0_4,
256ebe
     },
256ebe
     {.key = "client.tcp-user-timeout",
256ebe
      .voltype = "protocol/client",
256ebe
@@ -1501,7 +1505,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
     {.key = "server.root-squash",
256ebe
      .voltype = "protocol/server",
256ebe
      .option = "root-squash",
256ebe
-     .op_version = 2},
256ebe
+     .op_version = 1},
256ebe
     {.key = "server.all-squash",
256ebe
      .voltype = "protocol/server",
256ebe
      .option = "all-squash",
256ebe
@@ -1509,11 +1513,11 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
     {.key = "server.anonuid",
256ebe
      .voltype = "protocol/server",
256ebe
      .option = "anonuid",
256ebe
-     .op_version = 3},
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0},
256ebe
     {.key = "server.anongid",
256ebe
      .voltype = "protocol/server",
256ebe
      .option = "anongid",
256ebe
-     .op_version = 3},
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0},
256ebe
     {.key = "server.statedump-path",
256ebe
      .voltype = "protocol/server",
256ebe
      .option = "statedump-path",
256ebe
@@ -1522,7 +1526,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
      .voltype = "protocol/server",
256ebe
      .option = "rpc.outstanding-rpc-limit",
256ebe
      .type = GLOBAL_DOC,
256ebe
-     .op_version = 3},
256ebe
+     .op_version = 2},
256ebe
     {.key = "server.ssl",
256ebe
      .voltype = "protocol/server",
256ebe
      .value = "off",
256ebe
@@ -1540,12 +1544,12 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
                        "the clients that are allowed to access the server."
256ebe
                        "By default, all TLS authenticated clients are "
256ebe
                        "allowed to access the server.",
256ebe
-        .op_version = GD_OP_VERSION_3_6_0,
256ebe
+        .op_version = GD_OP_VERSION_3_7_0,
256ebe
     },
256ebe
     {
256ebe
         .key = "server.manage-gids",
256ebe
         .voltype = "protocol/server",
256ebe
-        .op_version = GD_OP_VERSION_3_6_0,
256ebe
+        .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
     },
256ebe
     {
256ebe
         .key = "server.dynamic-auth",
256ebe
@@ -1556,12 +1560,12 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
         .key = "client.send-gids",
256ebe
         .voltype = "protocol/client",
256ebe
         .type = NO_DOC,
256ebe
-        .op_version = GD_OP_VERSION_3_6_0,
256ebe
+        .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
     },
256ebe
     {
256ebe
         .key = "server.gid-timeout",
256ebe
         .voltype = "protocol/server",
256ebe
-        .op_version = GD_OP_VERSION_3_6_0,
256ebe
+        .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
     },
256ebe
     {
256ebe
         .key = "server.own-thread",
256ebe
@@ -1573,7 +1577,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
     {
256ebe
         .key = "server.event-threads",
256ebe
         .voltype = "protocol/server",
256ebe
-        .op_version = GD_OP_VERSION_3_7_0,
256ebe
+        .op_version = GD_OP_VERSION_RHS_3_0_4,
256ebe
     },
256ebe
     {
256ebe
         .key = "server.tcp-user-timeout",
256ebe
@@ -1643,13 +1647,13 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
         .key = SSL_CERT_DEPTH_OPT,
256ebe
         .voltype = "rpc-transport/socket",
256ebe
         .option = "!ssl-cert-depth",
256ebe
-        .op_version = GD_OP_VERSION_3_6_0,
256ebe
+        .op_version = GD_OP_VERSION_3_7_0,
256ebe
     },
256ebe
     {
256ebe
         .key = SSL_CIPHER_LIST_OPT,
256ebe
         .voltype = "rpc-transport/socket",
256ebe
         .option = "!ssl-cipher-list",
256ebe
-        .op_version = GD_OP_VERSION_3_6_0,
256ebe
+        .op_version = GD_OP_VERSION_3_7_0,
256ebe
     },
256ebe
     {
256ebe
         .key = SSL_DH_PARAM_OPT,
256ebe
@@ -1690,8 +1694,8 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
     {.key = "performance.readdir-ahead",
256ebe
      .voltype = "performance/readdir-ahead",
256ebe
      .option = "!perf",
256ebe
-     .value = "on",
256ebe
-     .op_version = 3,
256ebe
+     .value = "off",
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .description = "enable/disable readdir-ahead translator in the volume.",
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT},
256ebe
     {.key = "performance.io-cache",
256ebe
@@ -1804,7 +1808,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
     /* Feature translators */
256ebe
     {.key = "features.uss",
256ebe
      .voltype = "features/snapview-server",
256ebe
-     .op_version = GD_OP_VERSION_3_6_0,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .value = "off",
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT,
256ebe
      .validate_fn = validate_uss,
256ebe
@@ -1813,7 +1817,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
 
256ebe
     {.key = "features.snapshot-directory",
256ebe
      .voltype = "features/snapview-client",
256ebe
-     .op_version = GD_OP_VERSION_3_6_0,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .value = ".snaps",
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT,
256ebe
      .validate_fn = validate_uss_dir,
256ebe
@@ -1823,7 +1827,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
 
256ebe
     {.key = "features.show-snapshot-directory",
256ebe
      .voltype = "features/snapview-client",
256ebe
-     .op_version = GD_OP_VERSION_3_6_0,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .value = "off",
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT,
256ebe
      .description = "show entry point in readdir output of "
256ebe
@@ -1847,30 +1851,30 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
      .voltype = "features/cdc",
256ebe
      .option = "!feat",
256ebe
      .value = "off",
256ebe
-     .op_version = 3,
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
      .description = "enable/disable network compression translator",
256ebe
      .flags = VOLOPT_FLAG_XLATOR_OPT},
256ebe
     {.key = "network.compression.window-size",
256ebe
      .voltype = "features/cdc",
256ebe
      .option = "window-size",
256ebe
-     .op_version = 3},
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0},
256ebe
     {.key = "network.compression.mem-level",
256ebe
      .voltype = "features/cdc",
256ebe
      .option = "mem-level",
256ebe
-     .op_version = 3},
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0},
256ebe
     {.key = "network.compression.min-size",
256ebe
      .voltype = "features/cdc",
256ebe
      .option = "min-size",
256ebe
-     .op_version = 3},
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0},
256ebe
     {.key = "network.compression.compression-level",
256ebe
      .voltype = "features/cdc",
256ebe
      .option = "compression-level",
256ebe
-     .op_version = 3},
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0},
256ebe
     {.key = "network.compression.debug",
256ebe
      .voltype = "features/cdc",
256ebe
      .option = "debug",
256ebe
      .type = NO_DOC,
256ebe
-     .op_version = 3},
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0},
256ebe
 #endif
256ebe
 
256ebe
     /* Quota xlator options */
256ebe
@@ -1886,28 +1890,28 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
         .voltype = "features/quota",
256ebe
         .option = "default-soft-limit",
256ebe
         .type = NO_DOC,
256ebe
-        .op_version = 3,
256ebe
+        .op_version = 2,
256ebe
     },
256ebe
     {
256ebe
         .key = "features.soft-timeout",
256ebe
         .voltype = "features/quota",
256ebe
         .option = "soft-timeout",
256ebe
         .type = NO_DOC,
256ebe
-        .op_version = 3,
256ebe
+        .op_version = 2,
256ebe
     },
256ebe
     {
256ebe
         .key = "features.hard-timeout",
256ebe
         .voltype = "features/quota",
256ebe
         .option = "hard-timeout",
256ebe
         .type = NO_DOC,
256ebe
-        .op_version = 3,
256ebe
+        .op_version = 2,
256ebe
     },
256ebe
     {
256ebe
         .key = "features.alert-time",
256ebe
         .voltype = "features/quota",
256ebe
         .option = "alert-time",
256ebe
         .type = NO_DOC,
256ebe
-        .op_version = 3,
256ebe
+        .op_version = 2,
256ebe
     },
256ebe
     {
256ebe
         .key = "features.quota-deem-statfs",
256ebe
@@ -2009,22 +2013,22 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
      .voltype = "debug/error-gen",
256ebe
      .option = "failure",
256ebe
      .type = NO_DOC,
256ebe
-     .op_version = 3},
256ebe
+     .op_version = 2},
256ebe
     {.key = "debug.error-number",
256ebe
      .voltype = "debug/error-gen",
256ebe
      .option = "error-no",
256ebe
      .type = NO_DOC,
256ebe
-     .op_version = 3},
256ebe
+     .op_version = 2},
256ebe
     {.key = "debug.random-failure",
256ebe
      .voltype = "debug/error-gen",
256ebe
      .option = "random-failure",
256ebe
      .type = NO_DOC,
256ebe
-     .op_version = 3},
256ebe
+     .op_version = 2},
256ebe
     {.key = "debug.error-fops",
256ebe
      .voltype = "debug/error-gen",
256ebe
      .option = "enable",
256ebe
      .type = NO_DOC,
256ebe
-     .op_version = 3},
256ebe
+     .op_version = 2},
256ebe
 
256ebe
     /* NFS xlator options */
256ebe
     {.key = "nfs.enable-ino32",
256ebe
@@ -2066,7 +2070,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
      .voltype = "nfs/server",
256ebe
      .option = "rpc.outstanding-rpc-limit",
256ebe
      .type = GLOBAL_DOC,
256ebe
-     .op_version = 3},
256ebe
+     .op_version = 2},
256ebe
     {.key = "nfs.port",
256ebe
      .voltype = "nfs/server",
256ebe
      .option = "nfs.port",
256ebe
@@ -2128,7 +2132,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
      .voltype = "nfs/server",
256ebe
      .option = "nfs.acl",
256ebe
      .type = GLOBAL_DOC,
256ebe
-     .op_version = 3},
256ebe
+     .op_version = 2},
256ebe
     {.key = "nfs.mount-udp",
256ebe
      .voltype = "nfs/server",
256ebe
      .option = "nfs.mount-udp",
256ebe
@@ -2144,14 +2148,14 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
         .voltype = "nfs/server",
256ebe
         .option = "nfs.rpc-statd",
256ebe
         .type = NO_DOC,
256ebe
-        .op_version = GD_OP_VERSION_3_6_0,
256ebe
+        .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
     },
256ebe
     {
256ebe
         .key = "nfs.log-level",
256ebe
         .voltype = "nfs/server",
256ebe
         .option = "nfs.log-level",
256ebe
         .type = NO_DOC,
256ebe
-        .op_version = GD_OP_VERSION_3_6_0,
256ebe
+        .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
     },
256ebe
     {.key = "nfs.server-aux-gids",
256ebe
      .voltype = "nfs/server",
256ebe
@@ -2162,27 +2166,27 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
      .voltype = "nfs/server",
256ebe
      .option = "nfs.drc",
256ebe
      .type = GLOBAL_DOC,
256ebe
-     .op_version = 3},
256ebe
+     .op_version = 1},
256ebe
     {.key = "nfs.drc-size",
256ebe
      .voltype = "nfs/server",
256ebe
      .option = "nfs.drc-size",
256ebe
      .type = GLOBAL_DOC,
256ebe
-     .op_version = 3},
256ebe
+     .op_version = 1},
256ebe
     {.key = "nfs.read-size",
256ebe
      .voltype = "nfs/server",
256ebe
      .option = "nfs3.read-size",
256ebe
      .type = GLOBAL_DOC,
256ebe
-     .op_version = 3},
256ebe
+     .op_version = 2},
256ebe
     {.key = "nfs.write-size",
256ebe
      .voltype = "nfs/server",
256ebe
      .option = "nfs3.write-size",
256ebe
      .type = GLOBAL_DOC,
256ebe
-     .op_version = 3},
256ebe
+     .op_version = 2},
256ebe
     {.key = "nfs.readdir-size",
256ebe
      .voltype = "nfs/server",
256ebe
      .option = "nfs3.readdir-size",
256ebe
      .type = GLOBAL_DOC,
256ebe
-     .op_version = 3},
256ebe
+     .op_version = 2},
256ebe
     {.key = "nfs.rdirplus",
256ebe
      .voltype = "nfs/server",
256ebe
      .option = "nfs.rdirplus",
256ebe
@@ -2219,7 +2223,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
     {.key = "features.read-only",
256ebe
      .voltype = "features/read-only",
256ebe
      .option = "read-only",
256ebe
-     .op_version = 1,
256ebe
+     .op_version = 2,
256ebe
      .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT},
256ebe
     {.key = "features.worm",
256ebe
      .voltype = "features/worm",
256ebe
@@ -2266,14 +2270,14 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
     {.key = "storage.linux-aio", .voltype = "storage/posix", .op_version = 1},
256ebe
     {.key = "storage.batch-fsync-mode",
256ebe
      .voltype = "storage/posix",
256ebe
-     .op_version = 3},
256ebe
+     .op_version = 2},
256ebe
     {.key = "storage.batch-fsync-delay-usec",
256ebe
      .voltype = "storage/posix",
256ebe
-     .op_version = 3},
256ebe
+     .op_version = 2},
256ebe
     {
256ebe
         .key = "storage.xattr-user-namespace-mode",
256ebe
         .voltype = "storage/posix",
256ebe
-        .op_version = GD_OP_VERSION_3_6_0,
256ebe
+        .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
     },
256ebe
     {.key = "storage.owner-uid",
256ebe
      .voltype = "storage/posix",
256ebe
@@ -2285,15 +2289,15 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
      .op_version = 1},
256ebe
     {.key = "storage.node-uuid-pathinfo",
256ebe
      .voltype = "storage/posix",
256ebe
-     .op_version = 3},
256ebe
+     .op_version = 2},
256ebe
     {.key = "storage.health-check-interval",
256ebe
      .voltype = "storage/posix",
256ebe
-     .op_version = 3},
256ebe
+     .op_version = 2},
256ebe
     {
256ebe
         .option = "update-link-count-parent",
256ebe
         .key = "storage.build-pgfid",
256ebe
         .voltype = "storage/posix",
256ebe
-        .op_version = GD_OP_VERSION_3_6_0,
256ebe
+        .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
     },
256ebe
     {
256ebe
         .option = "gfid2path",
256ebe
@@ -2363,7 +2367,9 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
         .voltype = "storage/posix",
256ebe
         .op_version = GD_OP_VERSION_4_1_0,
256ebe
     },
256ebe
-    {.key = "storage.bd-aio", .voltype = "storage/bd", .op_version = 3},
256ebe
+    {.key = "storage.bd-aio",
256ebe
+     .voltype = "storage/bd",
256ebe
+     .op_version = GD_OP_VERSION_RHS_3_0},
256ebe
     {.key = "config.memory-accounting",
256ebe
      .voltype = "mgmt/glusterd",
256ebe
      .option = "!config",
256ebe
@@ -2385,37 +2391,37 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
     {.key = GLUSTERD_QUORUM_TYPE_KEY,
256ebe
      .voltype = "mgmt/glusterd",
256ebe
      .value = "off",
256ebe
-     .op_version = 2},
256ebe
+     .op_version = 1},
256ebe
     {.key = GLUSTERD_QUORUM_RATIO_KEY,
256ebe
      .voltype = "mgmt/glusterd",
256ebe
      .value = "0",
256ebe
-     .op_version = 2},
256ebe
+     .op_version = 1},
256ebe
     /* changelog translator - global tunables */
256ebe
     {.key = "changelog.changelog",
256ebe
      .voltype = "features/changelog",
256ebe
      .type = NO_DOC,
256ebe
-     .op_version = 3},
256ebe
+     .op_version = 2},
256ebe
     {.key = "changelog.changelog-dir",
256ebe
      .voltype = "features/changelog",
256ebe
      .type = NO_DOC,
256ebe
-     .op_version = 3},
256ebe
+     .op_version = 2},
256ebe
     {.key = "changelog.encoding",
256ebe
      .voltype = "features/changelog",
256ebe
      .type = NO_DOC,
256ebe
-     .op_version = 3},
256ebe
+     .op_version = 2},
256ebe
     {.key = "changelog.rollover-time",
256ebe
      .voltype = "features/changelog",
256ebe
      .type = NO_DOC,
256ebe
-     .op_version = 3},
256ebe
+     .op_version = 2},
256ebe
     {.key = "changelog.fsync-interval",
256ebe
      .voltype = "features/changelog",
256ebe
      .type = NO_DOC,
256ebe
-     .op_version = 3},
256ebe
+     .op_version = 2},
256ebe
     {
256ebe
         .key = "changelog.changelog-barrier-timeout",
256ebe
         .voltype = "features/changelog",
256ebe
         .value = BARRIER_TIMEOUT,
256ebe
-        .op_version = GD_OP_VERSION_3_6_0,
256ebe
+        .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
     },
256ebe
     {.key = "changelog.capture-del-path",
256ebe
      .voltype = "features/changelog",
256ebe
@@ -2426,18 +2432,18 @@ struct volopt_map_entry glusterd_volopt_map[] = {
256ebe
         .voltype = "features/barrier",
256ebe
         .value = "disable",
256ebe
         .type = NO_DOC,
256ebe
-        .op_version = GD_OP_VERSION_3_7_0,
256ebe
+        .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
     },
256ebe
     {
256ebe
         .key = "features.barrier-timeout",
256ebe
         .voltype = "features/barrier",
256ebe
         .value = BARRIER_TIMEOUT,
256ebe
-        .op_version = GD_OP_VERSION_3_6_0,
256ebe
+        .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
     },
256ebe
     {
256ebe
         .key = GLUSTERD_GLOBAL_OP_VERSION_KEY,
256ebe
         .voltype = "mgmt/glusterd",
256ebe
-        .op_version = GD_OP_VERSION_3_6_0,
256ebe
+        .op_version = GD_OP_VERSION_RHS_3_0,
256ebe
     },
256ebe
     {
256ebe
         .key = GLUSTERD_MAX_OP_VERSION_KEY,
256ebe
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c
256ebe
index c8e84f6..dea6c28 100644
256ebe
--- a/xlators/protocol/client/src/client.c
256ebe
+++ b/xlators/protocol/client/src/client.c
256ebe
@@ -3002,7 +3002,7 @@ struct volume_options options[] = {
256ebe
     {.key = {"send-gids"},
256ebe
      .type = GF_OPTION_TYPE_BOOL,
256ebe
      .default_value = "on",
256ebe
-     .op_version = {GD_OP_VERSION_3_6_0},
256ebe
+     .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
      .flags = OPT_FLAG_SETTABLE},
256ebe
     {.key = {"event-threads"},
256ebe
      .type = GF_OPTION_TYPE_INT,
256ebe
@@ -3013,7 +3013,7 @@ struct volume_options options[] = {
256ebe
                     "in parallel. Larger values would help process"
256ebe
                     " responses faster, depending on available processing"
256ebe
                     " power. Range 1-32 threads.",
256ebe
-     .op_version = {GD_OP_VERSION_3_7_0},
256ebe
+     .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
      .flags = OPT_FLAG_SETTABLE | OPT_FLAG_DOC},
256ebe
     {.key = {NULL}},
256ebe
 };
256ebe
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
256ebe
index b4b447b..6ae63ba 100644
256ebe
--- a/xlators/protocol/server/src/server.c
256ebe
+++ b/xlators/protocol/server/src/server.c
256ebe
@@ -1854,13 +1854,13 @@ struct volume_options server_options[] = {
256ebe
      .type = GF_OPTION_TYPE_BOOL,
256ebe
      .default_value = "off",
256ebe
      .description = "Resolve groups on the server-side.",
256ebe
-     .op_version = {GD_OP_VERSION_3_6_0},
256ebe
+     .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
      .flags = OPT_FLAG_SETTABLE | OPT_FLAG_DOC},
256ebe
     {.key = {"gid-timeout"},
256ebe
      .type = GF_OPTION_TYPE_INT,
256ebe
      .default_value = "300",
256ebe
      .description = "Timeout in seconds for the cached groups to expire.",
256ebe
-     .op_version = {GD_OP_VERSION_3_6_0},
256ebe
+     .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
      .flags = OPT_FLAG_SETTABLE | OPT_FLAG_DOC},
256ebe
     {.key = {"event-threads"},
256ebe
      .type = GF_OPTION_TYPE_INT,
256ebe
@@ -1871,7 +1871,7 @@ struct volume_options server_options[] = {
256ebe
                     "in parallel. Larger values would help process"
256ebe
                     " responses faster, depending on available processing"
256ebe
                     " power.",
256ebe
-     .op_version = {GD_OP_VERSION_3_7_0},
256ebe
+     .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
      .flags = OPT_FLAG_SETTABLE | OPT_FLAG_DOC},
256ebe
     {.key = {"dynamic-auth"},
256ebe
      .type = GF_OPTION_TYPE_BOOL,
256ebe
diff --git a/xlators/storage/posix/src/posix-common.c b/xlators/storage/posix/src/posix-common.c
256ebe
index f0d8e3f..ed82e35 100644
256ebe
--- a/xlators/storage/posix/src/posix-common.c
256ebe
+++ b/xlators/storage/posix/src/posix-common.c
256ebe
@@ -1243,7 +1243,7 @@ struct volume_options posix_options[] = {
256ebe
      .type = GF_OPTION_TYPE_BOOL,
256ebe
      .default_value = "off",
256ebe
      .description = "Enable placeholders for gfid to path conversion",
256ebe
-     .op_version = {GD_OP_VERSION_3_6_0},
256ebe
+     .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
      .flags = OPT_FLAG_SETTABLE | OPT_FLAG_DOC},
256ebe
     {.key = {"gfid2path"},
256ebe
      .type = GF_OPTION_TYPE_BOOL,
256ebe
@@ -1279,7 +1279,7 @@ struct volume_options posix_options[] = {
256ebe
          " The raw filesystem will not be compatible with OS X Finder.\n"
256ebe
          "\t- Strip: Will strip the user namespace before setting. The raw "
256ebe
          "filesystem will work in OS X.\n",
256ebe
-     .op_version = {GD_OP_VERSION_3_6_0},
256ebe
+     .op_version = {GD_OP_VERSION_RHS_3_0},
256ebe
      .flags = OPT_FLAG_SETTABLE | OPT_FLAG_DOC},
256ebe
 #endif
256ebe
     {
256ebe
-- 
256ebe
1.8.3.1
256ebe