linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Nikolay Borisov <nborisov@suse.com>
Cc: linux-btrfs@vger.kernel.org, Johannes.Thumshirn@wdc.com
Subject: Re: [PATCH] btrfs-progs: Fix xxhash on big endian machines
Date: Mon, 16 Mar 2020 23:56:23 +0100	[thread overview]
Message-ID: <20200316225623.GU12659@twin.jikos.cz> (raw)
In-Reply-To: <20200316090512.21519-1-nborisov@suse.com>

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@suse.com>

Added to devel, thanks.

  parent reply	other threads:[~2020-03-16 22:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-16  9:05 [PATCH] btrfs-progs: Fix xxhash on big endian machines Nikolay Borisov
2020-03-16  9:26 ` Johannes Thumshirn
2020-03-16 22:56 ` David Sterba [this message]
2020-03-17 20:34 ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200316225623.GU12659@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=Johannes.Thumshirn@wdc.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nborisov@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).