linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Mason <clm@fb.com>
To: Chandan Rajendra <chandan@linux.vnet.ibm.com>,
	Omar Sandoval <osandov@osandov.com>
Cc: <linux-btrfs@vger.kernel.org>, <kernel-team@fb.com>
Subject: Re: [PATCH 0/3] Btrfs: fix free space tree bitmaps+tests on big-endian systems
Date: Tue, 19 Jul 2016 15:25:16 -0400	[thread overview]
Message-ID: <83e50f77-ae10-4c8d-4a03-3c9af298d9c7@fb.com> (raw)
In-Reply-To: <2544227.upOtQjWuiQ@localhost.localdomain>

On 07/19/2016 12:06 PM, Chandan Rajendra wrote:
> On Monday, July 18, 2016 03:31:04 PM Omar Sandoval wrote:
>> Yeah, this should definitely not work. It's possible that things are
>> just silently failing and getting corrupted if the module isn't built
>> with CONFIG_BTRFS_ASSERT, but btrfsck v4.6.1 + my patch should catch
>> that.
>>
>> Chandan, is fsx creating enough fragmentation to trigger the switch to
>> bitmaps? You can check with `btrfs inspect dump-tree`; there should be
>> FREE_SPACE_BITMAP items. If there are only FREE_SPACE_EXTENT items, then
>> it's not testing the right code path.
>>
>> I have a script here [1] that I've been using to test the free space
>> tree. When I ran it with `--check` on MIPS, it failed on the old kernel
>> and passed with this series. If you stick a return after the call to
>> `unlink_every_other_file()`, you'll get a nice, fragmented filesystem to
>> feed to xfstests, as well.
>
> You are right, There were only FREE_SPACE_EXTENT items in the filesystem that
> was operated on by fsx. I executed fragment_free_space_tree.py to create a
> filesystem with FREE_SPACE_BITMAP items. When such a filesystem is created
> with the unpatched kernel, later mounted on a patched kernel and fsx executed
> on it, I see that we fail assertion statements in free-space-tree.c. For e.g.
>
> BTRFS error (device loop0): incorrect extent count for 289406976; counted 8186, expected 8192
> BTRFS: assertion failed: 0, file: /root/repos/linux/fs/btrfs/free-space-tree.c, line: 1485
>

Omar, looks like we need to make the patched kernel refuse to mount free 
space trees without a new incompat bit set.  That way there won't be any 
surprises for the people that have managed to get a free space tree 
saved.  Can it please printk a message about clearing the tree and 
mounting again?

-chris

  reply	other threads:[~2016-07-19 19:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-14 23:31 [PATCH 0/3] Btrfs: fix free space tree bitmaps+tests on big-endian systems Omar Sandoval
2016-07-14 23:31 ` [PATCH 1/3] Btrfs: fix free space tree bitmaps " Omar Sandoval
2016-07-14 23:31 ` [PATCH 2/3] Btrfs: fix extent buffer bitmap tests " Omar Sandoval
2016-07-14 23:31 ` [PATCH 3/3] Btrfs: expand free space tree sanity tests to catch endianness bug Omar Sandoval
2016-07-14 23:47 ` [PATCH 0/3] Btrfs: fix free space tree bitmaps+tests on big-endian systems Chris Mason
2016-07-15  7:04   ` Chandan Rajendra
2016-07-15 19:15     ` Omar Sandoval
2016-07-17 12:19       ` Chandan Rajendra
2016-07-18 18:43         ` Chris Mason
2016-07-18 22:31           ` Omar Sandoval
2016-07-19 16:06             ` Chandan Rajendra
2016-07-19 19:25               ` Chris Mason [this message]
2016-08-18 20:33                 ` Omar Sandoval
2016-08-26 11:06                   ` Anatoly Pugachev
2016-08-27  0:56                     ` Omar Sandoval
2016-08-27  7:16                       ` Anatoly Pugachev
2016-09-21 14:50                   ` David Sterba
2016-09-21 17:35                     ` Omar Sandoval
2016-07-31 13:04 ` Anatoly Pugachev

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=83e50f77-ae10-4c8d-4a03-3c9af298d9c7@fb.com \
    --to=clm@fb.com \
    --cc=chandan@linux.vnet.ibm.com \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=osandov@osandov.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).