Re: [PATCH] btrfs-progs: Fix xxhash on big endian machines

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

 



On Mon, Mar 16, 2020 at 11:05:12AM +0200, Nikolay Borisov wrote:
> xxhash's state and results are always in little, but in progs after the
> hash was calculated it was copied to the final buffer via memcpy,
> meaning it'd be parsed as a big endian number on big endian machines.
> This is incompatible with the kernel implementation of xxhash which
> results in erroneous "checksum didn't match" errors on mount.
> 
> Fix it by using put_unaligned_le64 which always ensures the resulting
> checksum will be copied in little endian format as the kernel expects
> it.
> 
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=206835
> Fixes: f070ece2e98f ("btrfs-progs: add xxhash64 to mkfs")
> Signed-off-by: Nikolay Borisov <nborisov@xxxxxxxx>

Added to devel, thanks.



[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