From c3ed484af54e32c1ef2300cda652604d75dc9d20 Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Mon, 14 Sep 2015 17:09:29 +0530 Subject: glusterd: call glusterd_store_volinfo in bump up op-version After an upgrade, op-version is expected to be updated through gluster volume set. If the new version introduces any feature which changes volinfo structure without storing the default values of these new options would result into cksum issues. Change-Id: I57b4667f3403839811735bf66bef29e5200a9241 BUG: 1262805 Signed-off-by: Atin Mukherjee Reviewed-on: http://review.gluster.org/12171 Tested-by: Gluster Build System Reviewed-by: Krishnan Parthasarathi Reviewed-by: Gaurav Kumar Garg --- xlators/mgmt/glusterd/src/glusterd-op-sm.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'xlators/mgmt') diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 3dfc50f8126..39c989fa53e 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -2203,6 +2203,7 @@ glusterd_op_set_all_volume_options (xlator_t *this, dict_t *dict, char *next_version = NULL; gf_boolean_t quorum_action = _gf_false; uint32_t op_version = 0; + glusterd_volinfo_t *volinfo = NULL; conf = this->private; ret = dict_get_str (dict, "key1", &key); @@ -2255,6 +2256,12 @@ glusterd_op_set_all_volume_options (xlator_t *this, dict_t *dict, "Failed to store op-version."); } } + cds_list_for_each_entry (volinfo, &conf->volumes, vol_list) { + ret = glusterd_store_volinfo + (volinfo, GLUSTERD_VOLINFO_VER_AC_INCREMENT); + if (ret) + goto out; + } /* No need to save cluster.op-version in conf->opts */ goto out; -- cgit