summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2013-04-01 17:55:30 +0530
committerVijay Bellur <vbellur@redhat.com>2013-06-05 05:24:59 -0700
commit6cedf2d7a61aa3f26522033c0fb12467b7631dbc (patch)
treec3751f8663a936b6d5d44504d41ddf43c66fc701 /xlators/mgmt/glusterd/src/glusterd-op-sm.c
parent4965109a3c7d456b9f19eb67cf023ba86069e6e7 (diff)
glusterd: Introduce volume op-versions
This is a backport of change 9153855 glusterd: Introduce volume op-versions from master. Each volume is now associated with two op-versions, * op_version - the op-version of the highest op-versioned feature enabled * client_op_version - the op-version of the highest op-versioned feature enabled which affects the clients only. These two op-versions are generated dynamically and kept updated during runtime. Glusterd now uses the respective volumes' client-op-version during getspec requests. To achieve the above a new field in the vme table is introduced, client_option, this boolean field tells if the option is a client side option. BUG: 907311 Change-Id: I59af02644a714e1c54fc89f1ead5aa551bba7ee7 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4957 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 19f0934cd..aa0543609 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -1328,6 +1328,8 @@ glusterd_op_reset_volume (dict_t *dict, char **op_errstr)
key);
}
+ gd_update_volume_op_versions (volinfo);
+
out:
GF_FREE (key_fixed);
if (quorum_action)
@@ -1510,6 +1512,7 @@ glusterd_op_set_volume (dict_t *dict)
goto out;
}
+ // TODO: Remove this once v3.3 compatability is not required
check_op_version = dict_get_str_boolean (dict, "check-op-version",
_gf_false);
@@ -1638,6 +1641,7 @@ glusterd_op_set_volume (dict_t *dict)
goto out;
}
}
+ gd_update_volume_op_versions (volinfo);
} else {
list_for_each_entry (voliter, &priv->volumes, vol_list) {
@@ -1664,6 +1668,7 @@ glusterd_op_set_volume (dict_t *dict)
goto out;
}
}
+ gd_update_volume_op_versions (volinfo);
}
}