From: David Sterba <dsterba@suse.cz>
To: "Holger Hoffstätte" <holger@applied-asynchrony.com>
Cc: Wang Yugui <wangyugui@e16-tech.com>,
josef@toxicpanda.com, linux-btrfs@vger.kernel.org
Subject: Re: error in backport of 'btrfs: fix possible free space tree corruption with online conversion'
Date: Fri, 19 Feb 2021 18:37:53 +0100 [thread overview]
Message-ID: <20210219173753.GH1993@twin.jikos.cz> (raw)
In-Reply-To: <20814c8d-a54d-1b4b-cb28-b749afcf9f18@applied-asynchrony.com>
On Fri, Feb 19, 2021 at 05:12:12PM +0100, Holger Hoffstätte wrote:
> On 2021-02-19 16:20, Wang Yugui wrote:
> > --- a/fs/btrfs/ctree.h
> > +++ b/fs/btrfs/ctree.h
> > @@ -146,6 +146,9 @@ enum {
> > BTRFS_FS_STATE_DEV_REPLACING,
> > /* The btrfs_fs_info created for self-tests */
> > BTRFS_FS_STATE_DUMMY_FS_INFO,
> > +
> > + /* Indicate that we can't trust the free space tree for caching yet */
> > + BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED,
> > };
> >
> > #define BTRFS_BACKREF_REV_MAX 256
> >
> > Both the line(Line:146 vs Line:564) and the content are wrong.
> >
>
> Ahh..now I understand, indeed the merge of BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED went into
> the wrong enum. I misunderstood your original posting to mean that it had somehow missed
> a chunk or used the wrong enum value in set_bit.
>
> Anyway, good catch! I guess Dave needs to decide how to fix this, maybe
> let Greg revert & re-apply properly.
>
> Can anybody explain why git decided to do this?
Git finds that the patch does not apply and lets the user to fix it.
I did git cherry-pick of 2f96e40212d435b3284 on v5.10.12 and got 2
conflicts:
first was in caching_thread around
if (btrfs_fs_compat_ro(fs_info, FREE_SPACE_TREE))
that got resolved correctly, and the second one in the enum, but the
conflict was suggested in the right enum (lines 559+), so all I had to
do was to remove unmatched context and the <<< >>> markers. It's
possible that git version could affect that, mine is 2.29.2. Or stable
team does not use git for the intermediate patches and quilt did not get
it right.
I doubt that the conflict resolution was done incorrectly by hand, the
enums are quite far away so it would not be just a trivial change (like
context fixups) that are in the scope of semi-automatic stable
backports.
next prev parent reply other threads:[~2021-02-19 17:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-19 3:17 error in backport of 'btrfs: fix possible free space tree corruption with online conversion' Wang Yugui
2021-02-19 13:18 ` Holger Hoffstätte
2021-02-19 15:20 ` Wang Yugui
2021-02-19 16:12 ` Holger Hoffstätte
2021-02-19 17:37 ` David Sterba [this message]
2021-02-19 17:13 ` David Sterba
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=20210219173753.GH1993@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=holger@applied-asynchrony.com \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=wangyugui@e16-tech.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