[lkml]   [1996]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: SCSI device numbering (was: Re: Ideas for v2.1

Theodore Ts'o ( wrote:
> Stephen and I have been planning to add an 128-bit universally unique ID
> (UUID) in the ext2 superblock to help automate this process. It's also
> useful for his "supermount" for detecting when a removeable disk has
> really been changed.
> How do you generally a globally unique UUID? Simple. Generate a 128
> bit UUID as follows:
> 32 bits tv_sec of volume creation
> 32 bits tv_usec of volume creation
> 32 bits IP address of host which created the volume,
> or a random number if not available
> 32 bits random number

Minor nit: instead of using tv_usec, use tv_nsec. The "tv_usec" fields
are slowly being obsoleted by various POSIX functions, it seems, and I
suspect we're going to move to "struct timespec" as the main time
structure in the not too distant future.. We already can get better than
usec resolution for the clock on some hardware (resolution != precision,
though ;-), so...

(resolution != precision is actually only for the best in this case, we
just have more random bits ;-)


 \ /
  Last update: 2005-03-22 13:38    [W:0.048 / U:2.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site