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.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index 56a6414..c02c2c6 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -1444,7 +1444,7 @@ glusterd_store_snap_volume (glusterd_volinfo_t *volinfo, glusterd_snap_t *snap)
goto unlock;
ret = glusterd_store_create_snap_vol_dir (volinfo,
- snap->snap_name);
+ snap_volinfo->volname);
if (ret) {
gf_log (THIS->name, GF_LOG_ERROR,
"Failed create snapshot dir (%s) for volume "
@@ -2843,7 +2843,7 @@ glusterd_store_update_volinfo (glusterd_volinfo_t *volinfo,
goto out;
}
- GLUSTERD_GET_SNAP_DIR (volpath, parent_vol, snap->snap_name,
+ GLUSTERD_GET_SNAP_DIR (volpath, parent_vol, volinfo->volname,
conf);
} else {
GLUSTERD_GET_VOLUME_DIR(volpath, volinfo, conf);
@@ -3075,8 +3075,10 @@ glusterd_store_retrieve_volume (char *volname, glusterd_snap_t *snap)
ret = glusterd_volinfo_find (volname, &parent_vol);
if (ret)
goto out;
- strncpy (volinfo->volname, snap->snap_name, GLUSTERD_MAX_VOLUME_NAME);
- GLUSTERD_GET_SNAP_DIR (volpath, parent_vol, snap->snap_name, priv);
+ GLUSTERD_GET_UUID_NOHYPHEN(volinfo->volname,
+ snap->snap_id);
+ GLUSTERD_GET_SNAP_DIR (volpath, parent_vol, volinfo->volname,
+ priv);
strncpy (volinfo->parent_volname, volname, GLUSTERD_MAX_VOLUME_NAME);
} else {
strncpy (volinfo->volname, volname, GLUSTERD_MAX_VOLUME_NAME);