From: Anatoly Pugachev <matorola@gmail.com>
To: Omar Sandoval <osandov@osandov.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>,
Feifei Xu <xufeifei@linux.vnet.ibm.com>,
sparclinux@vger.kernel.org,
debian-sparc <debian-sparc@lists.debian.org>
Subject: Re: [PATCH] Btrfs: fix extent buffer bitmap tests on big-endian systems
Date: Wed, 13 Jul 2016 18:03:35 +0300 [thread overview]
Message-ID: <CADxRZqyJoD8b7OJTnqEdpwzfmAGuqKFZaUJUQ5EewTowXALqLw@mail.gmail.com> (raw)
In-Reply-To: <e6dc753c434a6570251d68d4233d05e6fa84ac67.1468365157.git.osandov@fb.com>
On Wed, Jul 13, 2016 at 2:21 AM, Omar Sandoval <osandov@osandov.com> wrote:
> From: Omar Sandoval <osandov@fb.com>
>
> The in-memory bitmap code manipulates words and is therefore sensitive
> to endianness, while the extent buffer bitmap code addresses bytes and
> is byte-order agnostic. Because the byte addressing of the extent buffer
> bitmaps is equivalent to a little-endian in-memory bitmap, the extent
> buffer bitmap tests fail on big-endian systems.
>
> 34b3e6c92af1 ("Btrfs: self-tests: Fix extent buffer bitmap test fail on
> BE system") worked around another endianness bug in the tests but missed
> this one because ed9e4afdb055 ("Btrfs: self-tests: Execute page
> straddling test only when nodesize < PAGE_SIZE") disables this part of
> the test on ppc64. That change lost the original meaning of the test,
> however. We really want to test that an equivalent series of operations
> using the in-memory bitmap API and the extent buffer bitmap API produces
> equivalent results.
>
> To fix this, don't use memcmp_extent_buffer() or write_extent_buffer();
> do everything bit-by-bit.
Just tested patched kernel, able to load btrfs module and mount fs.
Thanks a lot!
prev parent reply other threads:[~2016-07-13 15:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-12 23:21 [PATCH] Btrfs: fix extent buffer bitmap tests on big-endian systems Omar Sandoval
2016-07-13 13:35 ` David Sterba
2016-07-13 14:15 ` Feifei Xu
2016-07-13 15:03 ` Anatoly Pugachev [this message]
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=CADxRZqyJoD8b7OJTnqEdpwzfmAGuqKFZaUJUQ5EewTowXALqLw@mail.gmail.com \
--to=matorola@gmail.com \
--cc=debian-sparc@lists.debian.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=osandov@osandov.com \
--cc=sparclinux@vger.kernel.org \
--cc=xufeifei@linux.vnet.ibm.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).