From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: fdmanana@gmail.com, Qu Wenruo <wqu@suse.com>,
linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] btrfs: fix a bug that btrfs_invalidapge() can double account ordered extent for subpage
Date: Thu, 28 Jan 2021 11:50:19 +0100 [thread overview]
Message-ID: <20210128105019.GI1993@twin.jikos.cz> (raw)
In-Reply-To: <d4a1aae2-6941-0e7b-fbd4-30d28d58b6f5@gmx.com>
On Wed, Jan 27, 2021 at 06:52:04PM +0800, Qu Wenruo wrote:
> On 2021/1/27 下午6:44, Filipe Manana wrote:
> > On Wed, Jan 27, 2021 at 8:29 AM Qu Wenruo <wqu@suse.com> wrote:
> >> As the first iteration will find OE 1, which doesn't cover the full
> >> page, thus after cleanup code, we need to retry again.
> >> But again label will reset start to page_start, and we got OE 1 again,
> >> which causes double account on OE1, and cause OE1's byte_left to
> >> underflow.
> >>
> >> The only good news is, this problem can only happen for subpage case, as
> >> for regular sectorsize == PAGE_SIZE case, we will always find a OE ends
> >> at or after page end, thus no way to trigger the problem.
> >>
> >> This patch will move the again label after start = page_start, to fix
> >> the bug.
> >> This is just a quick fix, which is easy to backport.
> >
> > Hum? Why does it need to be backported?
> > There are no kernel releases that support subpage sector size yet and
> > this does not affect the case where sector size is the same as the
> > page size.
>
>
> Hmmm, right, there is no need to backport.
>
> Hopes David can remove that line when merging.
Yes, I've dropped the 'backport' line and slightly changed the wording
so it sounds like it's preparatory patch.
prev parent reply other threads:[~2021-01-28 10:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-27 6:38 [PATCH] btrfs: fix a bug that btrfs_invalidapge() can double account ordered extent for subpage Qu Wenruo
2021-01-27 10:44 ` Filipe Manana
2021-01-27 10:52 ` Qu Wenruo
2021-01-28 10:50 ` David Sterba [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=20210128105019.GI1993@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=fdmanana@gmail.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;
as well as URLs for NNTP newsgroup(s).