summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-utils.c
diff options
context:
space:
mode:
authorshishir gowda <sgowda@redhat.com>2013-10-24 15:47:14 +0530
committershishir gowda <sgowda@redhat.com>2013-10-29 16:50:53 +0530
commit65289765e7491ad778230dc4cc8248dff260aa11 (patch)
treeb9d505f2030918a85fcdeee61b2af8058d001ae0 /xlators/mgmt/glusterd/src/glusterd-utils.c
parentbd6089217135aed9aaa4a786590a14fc930ade6d (diff)
mgmt/glusterd: snapshot config changes
Also refactored code in glusterd for create command Additionally, removed brick-op func from jarvis_iniate_all_phases Change-Id: Iddcc332009c5716adee7f2b04c93b352fb983446 Signed-off-by: shishir gowda <sgowda@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index d312e80cb..cc504d5d4 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -422,6 +422,12 @@ glusterd_volinfo_new (glusterd_volinfo_t **volinfo)
{
glusterd_volinfo_t *new_volinfo = NULL;
int32_t ret = -1;
+ xlator_t *this = NULL;
+ glusterd_conf_t *conf = NULL;
+
+ this = THIS;
+
+ conf = this->private;
GF_ASSERT (volinfo);
@@ -450,6 +456,11 @@ glusterd_volinfo_new (glusterd_volinfo_t **volinfo)
goto out;
}
+ if (conf)
+ new_volinfo->snap_max_limit = conf->snap_max_limit;
+ else
+ new_volinfo->snap_max_limit = GLUSTERD_SNAPS_MAX_LIMIT;
+
new_volinfo->xl = THIS;
*volinfo = new_volinfo;