From ac5aea1cab063e4c92e7a686bfeea5929684c565 Mon Sep 17 00:00:00 2001 From: Sachin Pandit Date: Wed, 11 Dec 2013 05:53:01 +0530 Subject: 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 Signed-off-by: Rajesh Joseph --- xlators/mgmt/glusterd/src/glusterd-snapshot.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'xlators') diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c index cc56f9019..4ff485ca3 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; -- cgit