All of lore.kernel.org
 help / color / mirror / Atom feed
From: Omar Sandoval <osandov@osandov.com>
To: dsterba@suse.cz, Chris Mason <clm@fb.com>,
	Chandan Rajendra <chandan@linux.vnet.ibm.com>,
	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: Wed, 21 Sep 2016 10:35:47 -0700	[thread overview]
Message-ID: <20160921173547.GA14218@vader.DHCP.thefacebook.com> (raw)
In-Reply-To: <20160921145012.GJ16983@twin.jikos.cz>

On Wed, Sep 21, 2016 at 04:50:12PM +0200, David Sterba wrote:
> On Thu, Aug 18, 2016 at 01:33:27PM -0700, Omar Sandoval wrote:
> > > 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
> > 
> > Sorry it took me a month to get around to this, I tried to implement
> > this a couple of ways but I really don't like it. Basically, when we see
> > that we're missing the compat bit, we have to assume that the free space
> > tree was created with the same endianness that we're running on now.
> > That could lead to a false positive if, say, we created the filesystem
> > on a little-endian machine with an old kernel but are using it on a
> > big-endian system, or a false negative if it was created on a big-endian
> > machine with an old kernel but we're using it on a little-endian
> > machine.
> > 
> > There's also the question of making it a compat bit vs an incompat bit.
> > An incompat bit makes sure that we don't break the filesystem by
> > mounting it on an old big-endian kernel, but needlessly breaks
> > backwards-compatibility for little-endian.
> > 
> > I'd be much happier if we could just pretend this never happened. Here's
> > the patch, anyways, for the sake of completeness. Chris, what do you
> > think?
> 
> Here's my proposal how to resolve this:
> 
> * we have reports from people using intel hw that FST works fine for
>   them, so here I don't see any need to introduce incompat bits
> 
> * there are few users on bigendian machines, they need to update kernel
>   to store the correct layout of FST bitmap
> 
> * as majority of user will never hit the BE/LE problem, I'd focus on
>   advising how to reset the free space tree and let anybody update (ie.
>   pretend this hasn't happened)
> 
> I don't think we absolutelly must introduce the incompat bit and prevent
> a disaster, because there are very few users affected.

Thanks, Dave, that's what I was thinking, too. I'll rebase this series
and send it out as is. Hopefully we can get it in for 4.9, or 4.10 at
the latest.

-- 
Omar

  reply	other threads:[~2016-09-21 17:35 UTC|newest]

Thread overview: 22+ 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
2016-08-18 20:33                 ` Omar Sandoval
2016-08-26 11:06                   ` Anatoly Pugachev
2016-08-26 11:06                     ` Anatoly Pugachev
2016-08-27  0:56                     ` Omar Sandoval
2016-08-27  0:56                       ` Omar Sandoval
2016-08-27  7:16                       ` Anatoly Pugachev
2016-08-27  7:16                         ` Anatoly Pugachev
2016-09-21 14:50                   ` David Sterba
2016-09-21 17:35                     ` Omar Sandoval [this message]
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=20160921173547.GA14218@vader.DHCP.thefacebook.com \
    --to=osandov@osandov.com \
    --cc=chandan@linux.vnet.ibm.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.cz \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.