From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org, Chris Murphy <lists@colorremedies.com>
Subject: Re: [PATCH] btrfs-progs: mkfs: set super_cache_generation to 0 if we're using free space tree
Date: Tue, 17 Aug 2021 15:26:03 +0200 [thread overview]
Message-ID: <20210817132603.GL5047@twin.jikos.cz> (raw)
In-Reply-To: <20210731074240.206263-1-wqu@suse.com>
On Sat, Jul 31, 2021 at 03:42:40PM +0800, Qu Wenruo wrote:
> [HICCUP]
> There is a bug report that mkfs.btrfs -R free-space-tree still makes
> kernel to try to cleanup the v1 space cache:
>
> # mkfs.btrfs -R free-space-tree -f /dev/test/scratch1
> # mount /dev/test/scratch1 /mnt/btrfs
> # dmesg | grep cleaning
> BTRFS info (device dm-6): cleaning free space cache v1
>
> [CAUSE]
> By default, mkfs.btrfs will set super cache generation to (u64)-1, which
> will inform kernel that the v1 space cache is invalid, needs to
> regenerate it.
>
> But for free space cache tree, kernel will set super cache generation to
> 0, to indicate v1 space cache is not in use.
>
> This means, even we enabled free space tree with all the RO compatible
> bits and new tree, as long as super cache generation is not 0, kernel
> still consider the fs has some invalid v1 space cache, and will try to
> remove them.
>
> [FIX]
> This is not a big deal, but to make the "-R free-space-tree" to really
> work as kernel, we also need to set super cache generation to 0.
>
> Reported-by: Chris Murphy <lists@colorremedies.com>
> Link: https://lore.kernel.org/linux-btrfs/CAJCQCtSvgzyOnxtrqQZZirSycEHp+g0eDH5c+Kw9mW=PgxuXmw@mail.gmail.com/
> Signed-off-by: Qu Wenruo <wqu@suse.com>
Added to devel, thanks.
prev parent reply other threads:[~2021-08-17 13:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-31 7:42 [PATCH] btrfs-progs: mkfs: set super_cache_generation to 0 if we're using free space tree Qu Wenruo
2021-08-02 0:51 ` Anand Jain
2021-08-02 7:45 ` Nikolay Borisov
2021-08-17 13:26 ` David Sterba [this message]
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=20210817132603.GL5047@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=lists@colorremedies.com \
--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