From: Chris Mason <clm@meta.com>
To: dsterba@suse.cz, Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Qu Wenruo <wqu@suse.com>,
linux-btrfs@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>,
Chris Mason <clm@fb.com>
Subject: Re: [PATCH v2] btrfs: fix a possible race window when allocating new extent buffers
Date: Fri, 7 Jun 2024 11:37:10 -0400 [thread overview]
Message-ID: <2d3d6ffc-d3a2-4219-a496-75307f2ff83a@meta.com> (raw)
In-Reply-To: <20240607135603.GG18508@twin.jikos.cz>
On 6/7/24 9:56 AM, David Sterba wrote:
> On Fri, Jun 07, 2024 at 01:57:38PM +0930, Qu Wenruo wrote:
>>
>>
>> 在 2024/6/7 04:57, David Sterba 写道:
>> [...]
>>>
>>> Thanks. I'll pick the patch to branch for the next pull request, the fix has
>>> survived enough testing and we should get it to stable without further delays.
>>> I've edited the subject and changelog a bit, the problem is really the folio
>>> private protection, it is a race window fix but that does not tell much what is
>>> the cause. I've also added the reproducer script from Chris.
>>>
>>
>> Mind to push the updated version to for-next?
>
> Now updated, otherwise if you need to find it the branch is
> https://github.com/kdave/btrfs-devel/tree/misc-6.10 or it's in the
> linux-next source branch
> https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git/log/?h=next-fixes
>
>> I'd like to restart the test of larger metadata folios.
>> Ironically if we force larger metadata folios (one folio one metadata),
>> the race can also be solved, as now folio lock would kick in to prevent
>> the race.
>
> Yeah, but this would be an accidental fix. If we didn't understand that
> the bug was in our implementation I'm guessing large folios would be
> blamed and this won't make finding the problem easier. We need to be
> sure that the easy page->folio conversion is solid. You can start
> testing it but the actual switch may take a release or two.
I was going to suggest that we wait a bit as well. The new code is
holding up well to testing, and we're going to roll it to prod w/our 6.9
kernel, so it'll end up with lots of validation over the next 10 weeks
or so.
I'd definitely start on the large folios now, but also give the code we
have today a chance to soak before making the switch.
-chris
prev parent reply other threads:[~2024-06-07 15:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-06 1:31 [PATCH v2] btrfs: fix a possible race window when allocating new extent buffers Qu Wenruo
2024-06-06 16:22 ` Filipe Manana
2024-06-06 16:52 ` Josef Bacik
2024-06-06 19:27 ` David Sterba
2024-06-07 4:27 ` Qu Wenruo
2024-06-07 13:56 ` David Sterba
2024-06-07 15:37 ` Chris Mason [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=2d3d6ffc-d3a2-4219-a496-75307f2ff83a@meta.com \
--to=clm@meta.com \
--cc=clm@fb.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=mikhail.v.gavrilov@gmail.com \
--cc=quwenruo.btrfs@gmx.com \
--cc=torvalds@linux-foundation.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