From: Josef Bacik <josef@toxicpanda.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: tree-checker: add type and sequence check for inline backrefs
Date: Fri, 3 Nov 2023 09:45:47 -0400 [thread overview]
Message-ID: <20231103134547.GA3548732@perftesting> (raw)
In-Reply-To: <196ebcda-afff-45bc-a32a-bc313369e405@gmx.com>
On Fri, Nov 03, 2023 at 07:19:41AM +1030, Qu Wenruo wrote:
>
>
> On 2023/11/3 07:06, Josef Bacik wrote:
> > On Tue, Oct 24, 2023 at 12:41:11PM +1030, Qu Wenruo wrote:
> > > [BUG]
> > > There is a bug report that ntfs2btrfs had a bug that it can lead to
> > > transaction abort and the filesystem flips to read-only.
> > >
> > > [CAUSE]
> > > For inline backref items, kernel has a strict requirement for their
> > > ordered, they must follow the following rules:
> > >
> > > - All btrfs_extent_inline_ref::type should be in an ascending order
> > >
> > > - Within the same type, the items should follow a descending order by
> > > their sequence number
> > >
> > > For EXTENT_DATA_REF type, the sequence number is result from
> > > hash_extent_data_ref().
> > > For other types, their sequence numbers are
> > > btrfs_extent_inline_ref::offset.
> > >
> > > Thus if there is any code not following above rules, the resulted
> > > inline backrefs can prevent the kernel to locate the needed inline
> > > backref and lead to transaction abort.
> > >
> > > [FIX]
> > > Ntrfs2btrfs has already fixed the problem, and btrfs-progs has added the
> > > ability to detect such problems.
> > >
> > > For kernel, let's be more noisy and be more specific about the order, so
> > > that the next time kernel hits such problem we would reject it in the
> > > first place, without leading to transaction abort.
> > >
> > > Link: https://github.com/kdave/btrfs-progs/pull/622
> > > Signed-off-by: Qu Wenruo <wqu@suse.com>
> >
> > This broke squotas and I didn't notice it until I was running the CI for my
> > mount api changes.
> >
> > Lets try to use the CI for most things, even if you send it at the same time you
> > submit a job, it'll keep this sort of thing from happening. Thanks,
>
> My bad, didn't utilize CI at all.
>
> Any quick guides/docs on the CI system?
>
I'll put something in the developers docs, but just push your branch to github,
and submit a PR against btrfs/linux, the 'ci' branch, and it'll automatically
kick it off for you. Thanks,
Josef
next prev parent reply other threads:[~2023-11-03 13:45 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-24 2:11 [PATCH] btrfs: tree-checker: add type and sequence check for inline backrefs Qu Wenruo
2023-10-24 13:48 ` Josef Bacik
2023-10-24 20:36 ` Qu Wenruo
2023-10-24 19:53 ` David Sterba
2023-11-02 19:07 ` Boris Burkov
2023-11-02 20:17 ` Qu Wenruo
2023-11-02 20:19 ` David Sterba
2023-11-02 20:35 ` Boris Burkov
2023-11-02 21:05 ` Qu Wenruo
2023-11-02 21:34 ` Boris Burkov
2023-11-02 21:39 ` Qu Wenruo
2023-11-02 21:46 ` Boris Burkov
2023-11-02 21:47 ` Qu Wenruo
2023-11-03 15:04 ` David Sterba
2023-11-02 20:36 ` Josef Bacik
2023-11-02 20:49 ` Qu Wenruo
2023-11-03 13:45 ` Josef Bacik [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-07-16 9:11 Qu Wenruo
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=20231103134547.GA3548732@perftesting \
--to=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
--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