All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH] btrfs-progs: check: allow force v1 space cache cleanup even the fs has v2 space cache enabled
Date: Tue, 29 Dec 2020 08:30:35 +0800	[thread overview]
Message-ID: <20201229003035.13329-1-wqu@suse.com> (raw)

There are cases where v1 free space cache is still left while user has
already enabled v2 cache.

In that case, we still want to force v1 space cache cleanup in
btrfs-check.

This patch will remove the v2 check if we're cleaning up v1 cache,
allowing us to cleanup the leftover.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 check/main.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/check/main.c b/check/main.c
index 8ad7f5886f06..f4755d260bfe 100644
--- a/check/main.c
+++ b/check/main.c
@@ -9917,12 +9917,6 @@ static int do_clear_free_space_cache(int clear_version)
 	int ret = 0;
 
 	if (clear_version == 1) {
-		if (btrfs_fs_compat_ro(gfs_info, FREE_SPACE_TREE)) {
-			error(
-		"free space cache v2 detected, use --clear-space-cache v2");
-			ret = 1;
-			goto close_out;
-		}
 		ret = clear_free_space_cache();
 		if (ret) {
 			error("failed to clear free space cache");
-- 
2.29.2


             reply	other threads:[~2020-12-29  0:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-29  0:30 Qu Wenruo [this message]
2020-12-29  9:34 ` [PATCH] btrfs-progs: check: allow force v1 space cache cleanup even the fs has v2 space cache enabled Stéphane Lesimple
2021-01-14 18:49   ` 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=20201229003035.13329-1-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.