From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v4 0/3] btrfs: fixes for defrag_check_next_extent()
Date: Fri, 28 Jan 2022 15:21:19 +0800 [thread overview]
Message-ID: <cover.1643354254.git.wqu@suse.com> (raw)
That function is reused between older kernels (v5.15) and the refactored
defrag code (v5.16+).
However that function has one long existing bugs affecting defrag to
handle preallocated range.
And it can not handle compressed extent well neither.
Finally there is an ambiguous check which doesn't make much sense by
itself, and can be related by enhanced extent capacity check.
This series will fix all the 3 problem mentioned above.
Changelog:
v2:
- Use @extent_thresh from caller to replace the harded coded threshold
Now caller has full control over the extent threshold value.
- Remove the old ambiguous check based on physical address
The original check is too specific, only reject extents which are
physically adjacent, AND too large.
Since we have correct size check now, and the physically adjacent check
is not always a win.
So remove the old check completely.
v3:
- Split the @extent_thresh and physicall adjacent check into other
patches
- Simplify the comment
v4:
- Fix the @em usage which should be @next.
As it will fail the submitted test case.
Qu Wenruo (3):
btrfs: defrag: don't try to merge regular extents with preallocated
extents
btrfs: defrag: don't defrag extents which is already at its max
capacity
btrfs: defrag: remove an ambiguous condition for rejection
fs/btrfs/ioctl.c | 35 ++++++++++++++++++++++++++++-------
1 file changed, 28 insertions(+), 7 deletions(-)
--
2.34.1
next reply other threads:[~2022-01-28 7:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-28 7:21 Qu Wenruo [this message]
2022-01-28 7:21 ` [PATCH v4 1/3] btrfs: defrag: don't try to merge regular extents with preallocated extents Qu Wenruo
2022-01-28 11:50 ` Filipe Manana
2022-01-28 7:21 ` [PATCH v4 2/3] btrfs: defrag: don't defrag extents which is already at its max capacity Qu Wenruo
2022-02-01 15:03 ` David Sterba
2022-02-02 0:05 ` Qu Wenruo
2022-01-28 7:21 ` [PATCH v4 3/3] btrfs: defrag: remove an ambiguous condition for rejection Qu Wenruo
2022-01-28 12:17 ` [PATCH v4 0/3] btrfs: fixes for defrag_check_next_extent() Filipe Manana
2022-01-28 12:38 ` Qu Wenruo
2022-01-28 12:43 ` Filipe Manana
2022-01-28 12:45 ` Qu Wenruo
2022-01-28 21:54 ` David Sterba
2022-02-14 18:23 ` David Sterba
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.1643354254.git.wqu@suse.com \
--to=wqu@suse.com \
--cc=linux-btrfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.