Patchwork [5/8] nfsref: Type-4 UUIDs now preferred

login
register
mail settings
Submitter Chuck Lever
Date Oct. 11, 2012, 7:09 p.m.
Message ID <20121011190922.31447.83737.stgit@seurat.1015granger.net>
Download mbox | patch
Permalink /patch/190976/
State Accepted
Headers show

Comments

Chuck Lever - Oct. 11, 2012, 7:09 p.m.
Since revision 13 of the NSDB protocol draft, random variant (type 4)
UUIDs are recommended for FSN and FSL UUIDs.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 src/nfsref/add.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/src/nfsref/add.c b/src/nfsref/add.c
index 1ce11a5..c5caa34 100644
--- a/src/nfsref/add.c
+++ b/src/nfsref/add.c
@@ -235,7 +235,7 @@  nfsref_add_create_fedfs_fsn(nsdb_t host, const char *nce, char **fsn_uuid)
 		xlog(D_GENERAL, "%s: No memory", __func__);
 		return FEDFS_ERR_SVRFAULT;
 	}
-	uuid_generate_time(uu);
+	uuid_generate_random(uu);
 	uuid_unparse(uu, fsnuuid);
 
 	retval = nsdb_create_fsn_s(host, nce, fsnuuid,
@@ -333,7 +333,7 @@  nfsref_add_build_fsl(const char *fsn_uuid, nsdb_t host, const char *server,
 		return FEDFS_ERR_SVRFAULT;
 	}
 
-	uuid_generate_time(uu);
+	uuid_generate_random(uu);
 	uuid_unparse(uu, new->fl_fsluuid);
 	strncpy(new->fl_fsnuuid, fsn_uuid, sizeof(new->fl_fsnuuid));
 	strncpy(new->fl_nsdbname, nsdb_hostname(host), sizeof(new->fl_nsdbname));