From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/2] btrfs-progs: add lone extent defragging support
Date: Tue, 6 Feb 2024 10:16:10 +1030 [thread overview]
Message-ID: <cover.1707176488.git.wqu@suse.com> (raw)
This the progs support for the new kernel defrag parameters on lone file
extents.
This adds 2 new fine tunning parameters, --lone-ratio and
--lone-wasted-bytes.
The ratio is between [0, 65536], and wasted bytes is between
[0, U32_MAX], but in reality the value only makes sense below
max file extent size (for both compressed and regular extents).
Any value higher than max file extent size would mostly disable the
wasted bytes check (as it would always be false).
The end user interface is not yet deteremined, especially for the ratio
(RATIO/65536 is too trikcy for most end users).
But it is already enough to address the lone trimed file extent case
mentioned in the kernel patchset.
Qu Wenruo (2):
btrfs-progs: defrag: sync the new lone extent fine-tunning from kernel
btrfs-progs: cmds/filesystem: fine-tune lone file extents defragging
Documentation/btrfs-filesystem.rst | 18 ++++++++++
cmds/filesystem.c | 53 ++++++++++++++++++++++++++++--
kernel-shared/uapi/btrfs.h | 26 +++++++++++++--
3 files changed, 91 insertions(+), 6 deletions(-)
--
2.43.0
next reply other threads:[~2024-02-05 23:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-05 23:46 Qu Wenruo [this message]
2024-02-05 23:46 ` [PATCH 1/2] btrfs-progs: defrag: sync the new lone extent fine-tunning from kernel Qu Wenruo
2024-02-05 23:46 ` [PATCH 2/2] btrfs-progs: cmds/filesystem: fine-tune lone file extents defragging 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.1707176488.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox