Re: [PATCH v2 2/8] xfs: re-define uuid_t as common struct uuid_v1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christoph Hellwig <hch@xxxxxx> wrote:

> I'm not sure this really is a good idea.  uuid_v1 currently is only
> used by afs.  I'd much rather switch both afs and xfs to use the
> uuid_be type (which might as well grow the standard uuid_t name while
> we're at it), and use accessors that do the byte-array access for
> the very few places that care about the interpretation.

Leave struct uuid_v1 as is please.  The AFS protocol XDR encodes the fields as
delineated in the struct:

		r->time_low			= b[0];
		r->time_mid			= htons(ntohl(b[1]));
		r->time_hi_and_version		= htons(ntohl(b[2]));
		r->clock_seq_hi_and_reserved 	= ntohl(b[3]);
		r->clock_seq_low		= ntohl(b[4]);

		for (loop = 0; loop < 6; loop++)
			r->node[loop] = ntohl(b[loop + 5]);

Yeah, I know it's crazy to do it like this on the wire rather than just encode
it as a 16-byte blob, but that's what someone defined it as...  Trying to use
the uuid_be struct instead just makes things more messy.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux