From: Qu Wenruo <wqu@suse.com>
To: dsterba@suse.cz, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: make btrfs_super_block::log_root_transid deprecated
Date: Tue, 19 Jul 2022 09:31:28 +0800 [thread overview]
Message-ID: <03436e26-8408-6771-2f13-d4bbdbd99b7a@suse.com> (raw)
In-Reply-To: <20220718153410.GF13489@twin.jikos.cz>
On 2022/7/18 23:34, David Sterba wrote:
> 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.
In that case, we only need add "(deprecated)" to the string and adjust
the offset.
Do I need to update the patch or send a incremental update?
Thanks,
Qu
>
>> 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-19 1:31 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
2022-07-19 1:31 ` Qu Wenruo [this message]
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=03436e26-8408-6771-2f13-d4bbdbd99b7a@suse.com \
--to=wqu@suse.com \
--cc=dsterba@suse.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox