All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] btrfs-progs: add the ability to enable fst for btrfstune
@ 2023-05-02  1:01 Qu Wenruo
  2023-05-02  1:01 ` [PATCH 1/3] btrfs-progs: make check/clear-cache.c to be separate from check/main.c Qu Wenruo
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Qu Wenruo @ 2023-05-02  1:01 UTC (permalink / raw)
  To: linux-btrfs

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

-- 
2.39.2


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

end of thread, other threads:[~2023-05-02 18:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-02  1:01 [PATCH 0/3] btrfs-progs: add the ability to enable fst for btrfstune Qu Wenruo
2023-05-02  1:01 ` [PATCH 1/3] btrfs-progs: make check/clear-cache.c to be separate from check/main.c Qu Wenruo
2023-05-02  1:01 ` [PATCH 2/3] btrfs-progs: tune: add --convert-to-free-space-tree option Qu Wenruo
2023-05-02  1:01 ` [PATCH 3/3] btrfs-progs: misc-tests: add test case to verify btrfstune " Qu Wenruo
2023-05-02 18:25 ` [PATCH 0/3] btrfs-progs: add the ability to enable fst for btrfstune David Sterba

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.