From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: make btrfs_super_block::log_root_transid deprecated
Date: Mon, 18 Jul 2022 17:34:10 +0200 [thread overview]
Message-ID: <20220718153410.GF13489@twin.jikos.cz> (raw)
In-Reply-To: <ad5b8dbe66567eddd09025cf46114cc9412d1add.1654603274.git.wqu@suse.com>
On Tue, Jun 07, 2022 at 08:01:17PM +0800, Qu Wenruo wrote:
> This is the same on-disk format update synchronized from the kernel
> code.
>
> Unlike kernel, there are two callers reading this member:
>
> - btrfs inspect dump-super
> It's just outputting the value, since it's always 0 we can skip
> that output.
>
> - btrfs-find-root
> In that case, since we always got 0, the root search for log root
> should never find a perfect match.
>
> Use btrfs_super_geneartion() + 1 to provide a better result.
>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
Added to devel, thanks.
> --- a/kernel-shared/print-tree.c
> +++ b/kernel-shared/print-tree.c
> @@ -2014,8 +2014,6 @@ void btrfs_print_superblock(struct btrfs_super_block *sb, int full)
> (unsigned long long)btrfs_super_chunk_root_level(sb));
> printf("log_root\t\t%llu\n",
> (unsigned long long)btrfs_super_log_root(sb));
> - printf("log_root_transid\t%llu\n",
> - (unsigned long long)btrfs_super_log_root_transid(sb));
For dump super I'd like to keep it there, same as we print the value of
leafsize even if it's deprecated.
> printf("log_root_level\t\t%llu\n",
> (unsigned long long)btrfs_super_log_root_level(sb));
> printf("total_bytes\t\t%llu\n",
> --
> 2.36.1
next prev parent reply other threads:[~2022-07-18 15:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-07 12:01 [PATCH] btrfs-progs: make btrfs_super_block::log_root_transid deprecated Qu Wenruo
2022-07-18 15:34 ` David Sterba [this message]
2022-07-19 1:31 ` Qu Wenruo
2022-07-19 15:51 ` 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=20220718153410.GF13489@twin.jikos.cz \
--to=dsterba@suse.cz \
--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