Re: [RFC PATCH 4/7] Btrfs: introduce subvol uuids and times

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

 



On Thu, Jul 05, 2012 at 11:37:40AM -0700, Zach Brown wrote:
> 
> >and take endianess into account with le{64,32}_to_cpu and
> >cpu_to_le{64,32} macros.
> 
> The kernel doesn't support system calls from userspace of a different
> endianness, no worries there :)

What if you are on a big-endian machine with a big-endian kernel and
userspace?  Everything on-disk should be little-endian, so if you are
going to write stuff you got from userspace to disk, at some point you
have to make sure you are writing out bytes in the right order.

Alex already does that, so my remarks are moot ;)

+       root_item->stime.sec = cpu_to_le64(sa->stime.tv_sec);
+       root_item->stime.nsec = cpu_to_le64(sa->stime.tv_nsec);
+       root_item->rtime.sec = cpu_to_le64(sa->rtime.tv_sec);
+       root_item->rtime.nsec = cpu_to_le64(sa->rtime.tv_nsec);

Thanks,

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


[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