From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f66.google.com ([209.85.213.66]:34061 "EHLO mail-vk0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751346AbcGMPDp (ORCPT ); Wed, 13 Jul 2016 11:03:45 -0400 MIME-Version: 1.0 In-Reply-To: References: From: Anatoly Pugachev Date: Wed, 13 Jul 2016 18:03:35 +0300 Message-ID: Subject: Re: [PATCH] Btrfs: fix extent buffer bitmap tests on big-endian systems To: Omar Sandoval Cc: Btrfs BTRFS , Feifei Xu , sparclinux@vger.kernel.org, debian-sparc Content-Type: text/plain; charset=UTF-8 Sender: linux-btrfs-owner@vger.kernel.org List-ID: On Wed, Jul 13, 2016 at 2:21 AM, Omar Sandoval wrote: > From: Omar Sandoval > > 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!