From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>,
stable@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH for v5.15 2/2] btrfs: defrag: use the same cluster size for defrag ioctl and autodefrag
Date: Wed, 16 Feb 2022 20:49:29 +0800 [thread overview]
Message-ID: <1e93f7ce-b5c2-e0aa-9323-27d9b8bdee27@gmx.com> (raw)
In-Reply-To: <20220216123759.GP12643@twin.jikos.cz>
On 2022/2/16 20:37, David Sterba wrote:
> On Wed, Feb 16, 2022 at 03:09:08PM +0800, Qu Wenruo wrote:
>> No upstream commit.
>> Since the bug only exists between v5.11 and v5.15. In v5.16 btrfs
>> reworked defrag and no longer has this bug.
>
> I'm not sure this will work as a stable patch. A backport of an existing
> upstream patch that is only adapted to older stable code base is fine
> but what is the counterpart of this patch?
The whole ill-fated rework on defrag.
>
>>
>> [BUG]
>> Since commit 7f458a3873ae ("btrfs: fix race when defragmenting leads to
>> unnecessary IO") autodefrag no longer works with the following script:
>
> The bug does no seem to be significant, autodefrag is basically a
> heuristic so if it does not work perfectly in all cases it's still OK.
Normally I'd say yes.
But I don't want to surprise end users by suddenly increase their IO for
autodefrag in the next LTS.
This bug is really setting a high bar (or low IO expectation) for end users.
And another thing is, I can definitely create a local branch with this
fixed to test against fixed autodefrag code, but that won't make much sense.
Thus getting this merged could provide a more realistic baseline for
autodefrag.
Finally, one lesssen I learnt from the defrag thing is, if we allow some
untested/undefined corner cases, it will bite us eventually.
So I really want autodefrag to behave just like ioctl defrag, with a
pre-defined and predictable (at least not under races) behavior.
Thanks,
Qu
prev parent reply other threads:[~2022-02-16 12:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-16 7:09 [PATCH for v5.15 0/2] Defrag fixes for v5.15 Qu Wenruo
2022-02-16 7:09 ` [PATCH for v5.15 1/2] btrfs: don't hold CPU for too long when defragging a file Qu Wenruo
2022-02-17 19:01 ` Greg KH
2022-02-17 19:41 ` Holger Hoffstätte
2022-02-17 19:48 ` Greg KH
2022-02-18 0:06 ` Qu Wenruo
2022-02-16 7:09 ` [PATCH for v5.15 2/2] btrfs: defrag: use the same cluster size for defrag ioctl and autodefrag Qu Wenruo
2022-02-16 12:37 ` David Sterba
2022-02-16 12:49 ` Qu Wenruo [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=1e93f7ce-b5c2-e0aa-9323-27d9b8bdee27@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=stable@vger.kernel.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