Skip to content

btrfs-progs: add the ability to enable fst for btrfstune

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3btrfs-progs: make check/clear-cache.c to be separate from check/main.ccheck/clear-cache.c check/clear-cache.h check/main.c+52 -460 replies
2/3btrfs-progs: tune: add --convert-to-free-space-tree optionDocumentation/btrfstune.rst Makefile check/clear-cache.c +2 more+64 -50 replies
3/3btrfs-progs: misc-tests: add test case to verify btrfstune --convert-to-free-space-tree optiontests/misc-tests/057-btrfstune-free-space-tree/test.sh+21 -00 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/3] btrfs-progs: add the ability to enable fst for btrfstune

At the beginning of free space tree feature, it's enabled by "space_cache=v2" mount option.

However this introduced some problems:

- Lack of proper v1 cache clearing in the past
In the past we didn't properly clear v1 cache before enabling v2.

- More and more complex v2 cache dependency
Extent tree v2 and bgt all depend on v2 cache, but we have some mount options like clear_cache can screw this up.

Instead introducing some mount options to tinkering the filesystem features (either compat_ro or incompat), we should always go through btrfstune to enable new features (just like what we did in bgt).

This allows us to move the heavy lifting and proper checks into btrfs-progs.

Although it's already late, it's still better than never, thus this patchset introduce the --convert-to-free-space-tree feature to btrfstune.

Unlike bgt, v1 cache is going to fade out soon, thus no rollback functionality provided.

I hope we can deprecate the "space_cache=" mount option soon.

Qu Wenruo (3):
btrfs-progs: make check/clear-cache.c to be separate from check/main.c
btrfs-progs: tune: add --convert-to-free-space-tree option
btrfs-progs: misc-tests: add test case to verify btrfstune
--convert-to-free-space-tree option

 Documentation/btrfstune.rst                   |  5 ++
 Makefile                                      |  2 +-
 check/clear-cache.c                           | 84 ++++++++++---------
 check/clear-cache.h                           |  9 +-
 check/main.c                                  |  6 +-
 .../057-btrfstune-free-space-tree/test.sh     | 21 +++++
 tune/main.c                                   | 57 ++++++++++++-
 7 files changed, 135 insertions(+), 49 deletions(-)
 create mode 100755 tests/misc-tests/057-btrfstune-free-space-tree/test.sh
Signature · 1 line
2.39.2