Skip to content

btrfs-progs: add lone extent defragging support

Qu Wenruo linux-btrfs 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs-progs: defrag: sync the new lone extent fine-tunning from kernelkernel-shared/uapi/btrfs.h+23 -30 replies
2/2btrfs-progs: cmds/filesystem: fine-tune lone file extents defraggingDocumentation/btrfs-filesystem.rst cmds/filesystem.c+68 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] btrfs-progs: add lone extent defragging support

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