summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-store.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-store.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index f37ad9bec..1a00aac88 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -712,15 +712,6 @@ glusterd_volume_exclude_options_write (int fd, glusterd_volinfo_t *volinfo)
goto out;
}
- snprintf (buf, sizeof (buf), "%"PRIu64, volinfo->snap_max_soft_limit);
- ret = gf_store_save_value (fd, GLUSTERD_STORE_KEY_SNAP_MAX_SOFT_LIMIT,
- buf);
- if (ret) {
- gf_log (THIS->name, GF_LOG_ERROR,
- "Unable to write snap-max-soft-limit");
- goto out;
- }
-
out:
if (ret)
gf_log (THIS->name, GF_LOG_ERROR, "Unable to write volume "
@@ -2228,7 +2219,6 @@ glusterd_restore_op_version (xlator_t *this)
glusterd_conf_t *conf = NULL;
int ret = 0;
int op_version = 0;
- int snap_max_limit = GLUSTERD_SNAPS_MAX_LIMIT;
conf = this->private;
@@ -2238,8 +2228,9 @@ glusterd_restore_op_version (xlator_t *this)
if (ret) {
gf_log (this->name, GF_LOG_WARNING,
"Unable to retrieve system snap-max-hard-limit, "
- "setting it to %d", snap_max_limit);
- conf->snap_max_hard_limit = GLUSTERD_SNAPS_MAX_LIMIT;
+ "setting it to default value(%d)",
+ GLUSTERD_SNAPS_MAX_HARD_LIMIT);
+ conf->snap_max_hard_limit = GLUSTERD_SNAPS_MAX_HARD_LIMIT;
}
ret = glusterd_retrieve_sys_snap_max_limit (this,
@@ -2248,8 +2239,9 @@ glusterd_restore_op_version (xlator_t *this)
if (ret) {
gf_log (this->name, GF_LOG_WARNING,
"Unable to retrieve system snap-max-soft-limit, "
- "setting it to %d", snap_max_limit);
- conf->snap_max_soft_limit = GLUSTERD_SNAPS_MAX_LIMIT;
+ "setting it to default value(%d)",
+ GLUSTERD_SNAPS_DEF_SOFT_LIMIT_PERCENT);
+ conf->snap_max_soft_limit = GLUSTERD_SNAPS_DEF_SOFT_LIMIT_PERCENT;
}
ret = glusterd_retrieve_op_version (this, &op_version);
@@ -2799,9 +2791,6 @@ glusterd_store_retrieve_volume (char *volname, glusterd_snap_t *snap)
} else if (!strncmp (key, GLUSTERD_STORE_KEY_SNAP_MAX_HARD_LIMIT,
strlen (GLUSTERD_STORE_KEY_SNAP_MAX_HARD_LIMIT))) {
volinfo->snap_max_hard_limit = (uint64_t) atoll (value);
- } else if (!strncmp (key, GLUSTERD_STORE_KEY_SNAP_MAX_SOFT_LIMIT,
- strlen (GLUSTERD_STORE_KEY_SNAP_MAX_SOFT_LIMIT))) {
- volinfo->snap_max_soft_limit = (uint64_t) atoll (value);
} else if (!strncmp (key, GLUSTERD_STORE_KEY_PARENT_VOLNAME,
strlen (GLUSTERD_STORE_KEY_PARENT_VOLNAME))) {
strncpy (volinfo->parent_volname, value, sizeof(volinfo->parent_volname) - 1);