From 915385553e46d65e0b91ce62066a5575b07ee44d Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Mon, 1 Apr 2013 17:55:30 +0530 Subject: glusterd: Introduce volume op-versions 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. Change-Id: I12c83b1dd29ab506026efd50d448cebbcee53c27 BUG: 907311 Signed-off-by: Kaushal M Reviewed-on: http://review.gluster.org/4584 Reviewed-by: Krishnan Parthasarathi Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd-op-sm.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 4e4f0394d..dbc23525f 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -1337,6 +1337,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) @@ -1520,6 +1522,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); @@ -1648,6 +1651,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) { @@ -1674,6 +1678,7 @@ glusterd_op_set_volume (dict_t *dict) goto out; } } + gd_update_volume_op_versions (volinfo); } } -- cgit