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