All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/3] btrfs-progs: add the ability to enable fst for btrfstune
Date: Tue,  2 May 2023 09:01:43 +0800	[thread overview]
Message-ID: <cover.1682988988.git.wqu@suse.com> (raw)

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


             reply	other threads:[~2023-05-02  1:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-02  1:01 Qu Wenruo [this message]
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

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.1682988988.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 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.