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