Re: [PATCH v1] Btrfs: Switch to use new generic UUID API

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

 



On Fri, Jan 11, 2019 at 02:48:03PM +0100, David Sterba wrote:
> >  	if (is_fstree(objectid))
> > -		uuid_le_gen(&uuid);
> > -	memcpy(root->root_item.uuid, uuid.b, BTRFS_UUID_SIZE);
> > +		guid_gen((guid_t *)&root->root_item.uuid);
> > +	else
> > +		guid_copy((guid_t *)&root->root_item.uuid, &guid_null);
> 
> I don't like the type casts, a simple wrapper would be better I think.

It seems like we should use the guid_t type in the actual strutures
instead of doing this casting.  Andy, is there any reason I'm missing
why we can't do that in btrfs?



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

  Powered by Linux