summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachin Pandit <spandit@redhat.com>2013-12-11 05:53:01 +0530
committerRajesh Joseph <rjoseph@redhat.com>2014-01-06 15:46:44 +0530
commitac5aea1cab063e4c92e7a686bfeea5929684c565 (patch)
treec14cbec6f3db01733b9db572538ec2b2587329c3
parent976b983d26a81c23affca5455f6667487cbbe7e5 (diff)
glusterd/snapshot : Making snap uuid same across different nodes.
Till now we were generation a new uuid for a snap, that uuid was brick id, so the snap uuid was different for different nodes. Now we are copying the snap volume id to snap uuid so that it is unique across nodes. Note: Manually adding this patch again as this patch got missed in git reset option done on remote development branch Change-Id: Icb80caca9672b82de1b2129af47540c651a034ec Signed-off-by: Sachin Pandit <spandit@redhat.com> Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index cc56f90..4ff485c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -2696,7 +2696,6 @@ glusterd_snap_create (glusterd_volinfo_t *volinfo,
xlator_t *this = NULL;
glusterd_conf_t *priv = NULL;
int ret = -1;
- uuid_t snap_uuid;
this = THIS;
priv = this->private;
@@ -2719,8 +2718,7 @@ glusterd_snap_create (glusterd_volinfo_t *volinfo,
if (description)
snap->description = gf_strdup (description);
snap->time_stamp = time (NULL);
- uuid_generate (snap_uuid);
- uuid_copy (snap->snap_id, snap_uuid);
+ uuid_copy (snap->snap_id, snap_volinfo->volume_id);
if (cg_id)
uuid_copy (snap->cg_id, *cg_id);
snap->snap_volume = snap_volinfo;