diff options
author | Kaushal M <kaushal@redhat.com> | 2016-11-18 15:32:08 +0530 |
---|---|---|
committer | Kaushal M <kaushal@redhat.com> | 2016-11-18 15:32:08 +0530 |
commit | 94ba6c9995d3122f31cad2f4993ab07cd6ae7063 (patch) | |
tree | 6d5612c63e43da29ac19ff8c28377bd99a8ff9a4 /xlators/mgmt/glusterd/src/glusterd-op-sm.c | |
parent | c11131fcdf47c4f0144b0ee1709e8c4bb05dac08 (diff) | |
parent | a4ecc73a5cd7029dd5ad4a8545a4ec41365ffce9 (diff) |
Merge remote-tracking branch 'origin/release-3.7' into release-3.7
Due to a mistake done when tagging and pushing v3.7.17, v3.7.17 and
release-3.7 divereged, leaving the release-3.7 branch without the
v3.7.17 commit and tag. This merge resolves the divergence.
More information can about this is available in [1].
[1]: https://www.gluster.org/pipermail/maintainers/2016-November/001746.html
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-op-sm.c | 44 |
1 files changed, 33 insertions, 11 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index b5cc301c916..4345286cacc 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -40,6 +40,7 @@ #include "glusterd-locks.h" #include "glusterd-messages.h" #include "glusterd-utils.h" +#include "glusterd-quota.h" #include "syscall.h" #include "cli1-xdr.h" #include "common-utils.h" @@ -2235,17 +2236,19 @@ static int glusterd_op_set_all_volume_options (xlator_t *this, dict_t *dict, char **op_errstr) { - char *key = NULL; - char *key_fixed = NULL; - char *value = NULL; - char *dup_value = NULL; - int ret = -1; - glusterd_conf_t *conf = NULL; - dict_t *dup_opt = NULL; - char *next_version = NULL; - gf_boolean_t quorum_action = _gf_false; - uint32_t op_version = 0; - glusterd_volinfo_t *volinfo = NULL; + char *key = NULL; + char *key_fixed = NULL; + char *value = NULL; + char *dup_value = NULL; + int ret = -1; + glusterd_conf_t *conf = NULL; + dict_t *dup_opt = NULL; + char *next_version = NULL; + gf_boolean_t quorum_action = _gf_false; + uint32_t op_version = 0; + glusterd_volinfo_t *volinfo = NULL; + glusterd_volinfo_t *tmp_volinfo = NULL; + glusterd_volinfo_t *voliter = NULL; conf = this->private; ret = dict_get_str (dict, "key1", &key); @@ -2291,6 +2294,25 @@ glusterd_op_set_all_volume_options (xlator_t *this, dict_t *dict, if (op_version >= conf->op_version) { conf->op_version = op_version; + + /* When a bump up happens, update the quota.conf file + * as well. This is because, till 3.7 we had a quota + * conf version v1.1 in quota.conf. When inode-quota + * feature is introduced, this needs to be changed to + * v1.2 in quota.conf and 16 bytes uuid in quota.conf + * needs to be changed to 17 bytes. Look + * glusterd_store_quota_config for more details. + */ + cds_list_for_each_entry (voliter, &conf->volumes, vol_list) { + tmp_volinfo = voliter; + ret = glusterd_store_quota_config (tmp_volinfo, + NULL, NULL, + GF_QUOTA_OPTION_TYPE_UPGRADE, + NULL); + if (ret) + goto out; + } + ret = glusterd_store_global_info (this); if (ret) { gf_msg (this->name, GF_LOG_ERROR, 0, |