From: Qu Wenruo <wqu@suse.com>
To: stable@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org
Subject: [PATCH for v5.15 0/2] Defrag fixes for v5.15
Date: Wed, 16 Feb 2022 15:09:06 +0800 [thread overview]
Message-ID: <cover.1644994950.git.wqu@suse.com> (raw)
In v5.16 btrfs had a big rework (originally considered as a refactor
only) on defrag, which brings quite some regressions.
With those regressions, extra scrutiny is brought to defrag code, and
some existing bugs are exposed.
For v5.15, there are those patches need to be backported:
(Tracked through github issue:
https://github.com/btrfs/linux/issues/422)
- Already upstreamed:
"btrfs: don't hold CPU for too long when defragging a file"
The first patch.
- In maintainer's tree
btrfs: defrag: don't try to merge regular extents with preallocated extents
btrfs: defrag: don't defrag extents which are already at max capacity
btrfs: defrag: remove an ambiguous condition for rejection
Those will be backported when they get merged upstream.
- One special fix for v5.15
The 2nd patch.
The problem is, that patch has no upstream commit, since v5.16
reworked the defrag code and fix the problem unintentionally.
It's not a good idea to bring the whole rework (along with its bugs)
to stable kernel.
So here I crafted a small fix for v5.15 only.
Not sure if this is conflicted with any stable policy.
Qu Wenruo (2):
btrfs: don't hold CPU for too long when defragging a file
btrfs: defrag: use the same cluster size for defrag ioctl and
autodefrag
fs/btrfs/ioctl.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
--
2.35.1
next reply other threads:[~2022-02-16 7:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-16 7:09 Qu Wenruo [this message]
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
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=cover.1644994950.git.wqu@suse.com \
--to=wqu@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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