From: Nikolay Borisov <nborisov@suse.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>, Qu Wenruo <wqu@suse.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 2/2] btrfs-progs: Deprecate unused super block member log_root_transid
Date: Fri, 12 Oct 2018 12:13:36 +0300 [thread overview]
Message-ID: <cb6dd0fa-68e9-9e7c-c9cc-6ac609f9d9fc@suse.com> (raw)
In-Reply-To: <fbb5f43e-8eb0-08c6-a1c9-855efd960d3d@gmx.com>
On 12.10.2018 11:46, Qu Wenruo wrote:
>
>
> On 2018/10/12 下午2:53, Nikolay Borisov wrote:
>>
>>
>> On 12.10.2018 09:42, Qu Wenruo wrote:
>>> The only user of it is "btrfs inspect dump-super".
>>>
>>> Signed-off-by: Qu Wenruo <wqu@suse.com>
>>> ---
>>> cmds-inspect-dump-super.c | 4 ++--
>>> ctree.h | 6 ++----
>>> 2 files changed, 4 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/cmds-inspect-dump-super.c b/cmds-inspect-dump-super.c
>>> index e965267c5d96..3f33931ed9bc 100644
>>> --- a/cmds-inspect-dump-super.c
>>> +++ b/cmds-inspect-dump-super.c
>>> @@ -387,8 +387,8 @@ static void dump_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));
>>> + printf("log_root_transid (deprecated)\t%llu\n",
>>> + le64_to_cpu(sb->__unused_log_root_transid));
>>
>> This should be entirely removed.
>
> It looks OK to me.
> Just like the old leafsize.
>
> And if we try to use this member again, even old progs could show it
> without problem.
But what is the point of having something which always shows 0 and is
essentially unused?
>
> 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",
>>> diff --git a/ctree.h b/ctree.h
>>> index 4719962df67d..a314fdb102b0 100644
>>> --- a/ctree.h
>>> +++ b/ctree.h
>>> @@ -427,8 +427,8 @@ struct btrfs_super_block {
>>> __le64 chunk_root;
>>> __le64 log_root;
>>>
>>> - /* this will help find the new super based on the log root */
>>> - __le64 log_root_transid;
>>> + /* This member is never touched, should always be 0 */
>>> + __le64 __unused_log_root_transid;
>>> __le64 total_bytes;
>>> __le64 bytes_used;
>>> __le64 root_dir_objectid;
>>> @@ -2203,8 +2203,6 @@ BTRFS_SETGET_STACK_FUNCS(super_chunk_root_level, struct btrfs_super_block,
>>> chunk_root_level, 8);
>>> BTRFS_SETGET_STACK_FUNCS(super_log_root, struct btrfs_super_block,
>>> log_root, 64);
>>> -BTRFS_SETGET_STACK_FUNCS(super_log_root_transid, struct btrfs_super_block,
>>> - log_root_transid, 64);
>>> BTRFS_SETGET_STACK_FUNCS(super_log_root_level, struct btrfs_super_block,
>>> log_root_level, 8);
>>> BTRFS_SETGET_STACK_FUNCS(super_total_bytes, struct btrfs_super_block,
>>>
>
next prev parent reply other threads:[~2018-10-12 9:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-12 6:42 [PATCH 1/2] btrfs-progs: find-root: Fix wrong generation for log tree Qu Wenruo
2018-10-12 6:42 ` [PATCH 2/2] btrfs-progs: Deprecate unused super block member log_root_transid Qu Wenruo
2018-10-12 6:53 ` Nikolay Borisov
2018-10-12 8:46 ` Qu Wenruo
2018-10-12 9:13 ` Nikolay Borisov [this message]
2018-10-12 9:57 ` Qu Wenruo
2018-10-24 14:30 ` David Sterba
2018-10-24 14:48 ` Nikolay Borisov
2018-10-25 11:18 ` David Sterba
2018-10-25 20:40 ` Nikolay Borisov
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=cb6dd0fa-68e9-9e7c-c9cc-6ac609f9d9fc@suse.com \
--to=nborisov@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.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;
as well as URLs for NNTP newsgroup(s).