summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-ha.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-ha.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-ha.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-ha.c b/xlators/mgmt/glusterd/src/glusterd-ha.c
index 26de16b3a7a..398ecce5720 100644
--- a/xlators/mgmt/glusterd/src/glusterd-ha.c
+++ b/xlators/mgmt/glusterd/src/glusterd-ha.c
@@ -52,14 +52,19 @@
int32_t
glusterd_ha_create_volume (glusterd_volinfo_t *volinfo)
{
- char pathname[PATH_MAX] = {0,};
- int32_t ret = -1;
- char filepath[PATH_MAX] = {0,};
- char buf[4096] = {0,};
- int fd = -1;
+ char pathname[PATH_MAX] = {0,};
+ int32_t ret = -1;
+ char filepath[PATH_MAX] = {0,};
+ char buf[4096] = {0,};
+ int fd = -1;
+ glusterd_conf_t *priv = NULL;
GF_ASSERT (volinfo);
- snprintf (pathname, 1024, "%s/vols/%s", GLUSTERD_DEFAULT_WORKDIR,
+ priv = THIS->private;
+
+ GF_ASSERT (priv);
+
+ snprintf (pathname, 1024, "%s/vols/%s", priv->workdir,
volinfo->volname);
ret = mkdir (pathname, 0x777);