From 9a2b3fb8b9ff28edafa012dacc5f5f0e4ee1afab Mon Sep 17 00:00:00 2001 From: Avra Sengupta Date: Thu, 20 Oct 2016 12:58:16 +0530 Subject: snapshot: Fix the failure to recreate clones with same name The brick path of snapshot clones contained the clonename, thereby failing to create newer clones with the same name after the original clone had been deleted. This fix creates the brick path with the clone's vol id instead of the clones name. Hence future clones with the same name will not have the namespace clash. Change-Id: I262712adc576122f051b5d1ce171d020efaefd1a BUG: 1387160 Signed-off-by: Avra Sengupta Reviewed-on: http://review.gluster.org/15683 Smoke: Gluster Build System CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Rajesh Joseph --- xlators/mgmt/glusterd/src/glusterd.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/mgmt/glusterd/src/glusterd.h') diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index 333a099faa1..919eed02ec6 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -695,7 +695,8 @@ typedef ssize_t (*gd_serialize_t) (struct iovec outmsg, void *args); #define GLUSTERD_GET_UUID_NOHYPHEN(ret_string, uuid) do { \ char *snap_volname_ptr = ret_string; \ - char *snap_volid_ptr = uuid_utoa(uuid); \ + char tmp_uuid[64]; \ + char *snap_volid_ptr = uuid_utoa_r(uuid, tmp_uuid); \ while (*snap_volid_ptr) { \ if (*snap_volid_ptr == '-') { \ snap_volid_ptr++; \ -- cgit