Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: tests: fix free space tree test failure on 64K page system
Date: Fri, 13 Nov 2020 17:15:32 +0100	[thread overview]
Message-ID: <20201113161532.GD6756@twin.jikos.cz> (raw)
In-Reply-To: <20201111070245.92797-1-wqu@suse.com>

On Wed, Nov 11, 2020 at 03:02:45PM +0800, Qu Wenruo wrote:
> When trying to load btrfs with selftest compiled in, on 64K page system
> the test will always fail:
> 
>   BTRFS: selftest: running free space tree tests
>   BTRFS: selftest: fs/btrfs/tests/free-space-tree-tests.c:101 free space tree is invalid
>   BTRFS: selftest: fs/btrfs/tests/free-space-tree-tests.c:529 test_empty_block_group [btrfs] failed with extents, sectorsize=65536, nodesize=65536, alignment=134217728
> 
> The cause is that, after commit 801dc0c9ff1f ("btrfs: replace div_u64 by
> shift in free_space_bitmap_size"), we use fs_info->sectorsize_bits for
> free space cache.
> 
> But in comit fc59cfa7d2ab ("btrfs: use precalculated sectorsize_bits
> from fs_info"), we only initialized the fs_info for non-testing
> environment, leaving the default bits to be ilog2(4K), screwing up the
> selftest on 64K page system.
> 
> Fix it by also honor sectorsize_bits in selftest.
> 
> David, please fold this fix into the offending commit.

Thanks for catching it, patch updated.

      reply	other threads:[~2020-11-13 16:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11  7:02 [PATCH] btrfs: tests: fix free space tree test failure on 64K page system Qu Wenruo
2020-11-13 16:15 ` David Sterba [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=20201113161532.GD6756@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@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