public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs-progs: add lone extent defragging support
@ 2024-02-05 23:46 Qu Wenruo
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Qu Wenruo @ 2024-02-05 23:46 UTC (permalink / raw)
  To: linux-btrfs

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-05 23:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-05 23:46 [PATCH 0/2] btrfs-progs: add lone extent defragging support Qu Wenruo
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox