summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-handler.c
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2014-06-03 16:14:35 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2014-06-09 20:42:54 -0700
commit66b99406a769a14b50aac2d077b5698b8be30aa6 (patch)
treecdb283de0958be1b763d21a760fe79b86d8286af /xlators/mgmt/glusterd/src/glusterd-handler.c
parent211785f29904995324bfd3c7fa4b35a498bf632a (diff)
glusterd: Better op-version values and ranges
Till now, the op-version was an incrementing integer that was incremented by 1 for every Y release (when using the X.Y.Z release numbering). This is not flexible enough to handle backports of features into Z releases. Going forward, from the upcoming 3.6.0 release, the op-versions will be multi-digit integer values composed of the version numbers, instead of a simple incrementing integer. An X.Y.Z release will have XYZ as its op-version. Y and Z will always be 2 digits wide and will be padded with 0 if required. This way of bumping op-versions allows for gaps in between the subsequent Y releases. These gaps will allow backporting features from new Y releases into old Z releases. Change-Id: I463f82902d997ec07e76dae58ac935f33e6393c2 BUG: 1104997 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/7963 Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 0770f26a17c..33606461fe2 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -637,7 +637,7 @@ glusterd_op_txn_begin (rpcsvc_request_t *req, glusterd_op_t op, void *ctx,
}
/* Based on the op_version, acquire a cluster or mgmt_v3 lock */
- if (priv->op_version < GD_OP_VERSION_4) {
+ if (priv->op_version < GD_OP_VERSION_3_6_0) {
ret = glusterd_lock (MY_UUID);
if (ret) {
gf_log (this->name, GF_LOG_ERROR,
@@ -684,7 +684,7 @@ local_locking_done:
/* If no volname is given as a part of the command, locks will
* not be held, hence sending stage event. */
- if (volname || (priv->op_version < GD_OP_VERSION_4))
+ if (volname || (priv->op_version < GD_OP_VERSION_3_6_0))
event_type = GD_OP_EVENT_START_LOCK;
else {
txn_op_info.state.state = GD_OP_STATE_LOCK_SENT;
@@ -714,7 +714,7 @@ out:
if (locked && ret) {
/* Based on the op-version, we release the
* cluster or mgmt_v3 lock */
- if (priv->op_version < GD_OP_VERSION_4)
+ if (priv->op_version < GD_OP_VERSION_3_6_0)
glusterd_unlock (MY_UUID);
else {
ret = glusterd_mgmt_v3_unlock (volname, MY_UUID,
@@ -4339,7 +4339,7 @@ __glusterd_peer_rpc_notify (struct rpc_clnt *rpc, void *mydata,
glusterd_friend_sm_state_name_get (peerinfo->state.state));
if (peerinfo->connected) {
- if (conf->op_version < GD_OP_VERSION_4) {
+ if (conf->op_version < GD_OP_VERSION_3_6_0) {
glusterd_get_lock_owner (&uuid);
if (!uuid_is_null (uuid) &&
!uuid_compare (peerinfo->uuid, uuid))