summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-snapshot.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-snapshot.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index 7bfede0..116dd51 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -44,6 +44,8 @@
#include <mntent.h>
#endif
+char snap_mount_folder[PATH_MAX];
+
/* This function will restore a snapshot for the entire
* volume or the entire CG (Consistency Group)
*
@@ -717,7 +719,7 @@ glusterd_snapshot_create_prevalidate (dict_t *dict, char **op_errstr,
ret = snprintf (snap_mount, sizeof(snap_mount) - 1,
"%s/%s%s-brick",
- GLUSTERD_DEFAULT_SNAPS_BRICK_DIR,
+ snap_mount_folder,
snap_volname, device);
snap_mount[ret] = '\0';
@@ -2772,7 +2774,7 @@ glusterd_snap_brick_create (char *device, glusterd_volinfo_t *snap_volinfo,
snap_brick_dir++;
snprintf (snap_brick_mount_path, sizeof (snap_brick_mount_path),
- "%s/%s%s-brick", GLUSTERD_DEFAULT_SNAPS_BRICK_DIR,
+ "%s/%s%s-brick", snap_mount_folder,
snap_volinfo->volname, tmp);
snprintf (snap_brick_path, sizeof (snap_brick_path), "%s/%s",