Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: "Stéphane Lesimple" <stephane_btrfs2@lesimple.fr>
To: "Qu Wenruo" <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: check: allow force v1 space cache cleanup even the fs has v2 space cache enabled
Date: Tue, 29 Dec 2020 09:34:51 +0000	[thread overview]
Message-ID: <e471c466476658fd6c40cdaf71748d52@lesimple.fr> (raw)
In-Reply-To: <20201229003035.13329-1-wqu@suse.com>

December 29, 2020 1:32 AM, "Qu Wenruo" <wqu@suse.com> wrote:

> 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


Maybe we should keep the message but make it not fatal?
Something like "free space cache v2 detected, use --clear-space-cache v2 to clear it. Proceeding in clearing potential v1 leftovers as asked..."?

Regards,

Stéphane.

  reply	other threads:[~2020-12-29  9:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-29  0:30 [PATCH] btrfs-progs: check: allow force v1 space cache cleanup even the fs has v2 space cache enabled Qu Wenruo
2020-12-29  9:34 ` Stéphane Lesimple [this message]
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=e471c466476658fd6c40cdaf71748d52@lesimple.fr \
    --to=stephane_btrfs2@lesimple.fr \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox