From: Nikolay Borisov <nborisov@suse.com>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] btrfs: Rework error detection in init_tree_roots
Date: Tue, 4 Aug 2020 18:02:58 +0300 [thread overview]
Message-ID: <327aaaeb-affd-e762-921d-f2f823eec3bc@suse.com> (raw)
In-Reply-To: <SN4PR0401MB35982C96F01F6CD1AFB31C679B4A0@SN4PR0401MB3598.namprd04.prod.outlook.com>
On 4.08.20 г. 15:58 ч., Johannes Thumshirn wrote:
> On 04/08/2020 09:32, Nikolay Borisov wrote:
>> @@ -2645,17 +2645,16 @@ static int __cold init_tree_roots(struct btrfs_fs_info *fs_info)
>> level = btrfs_super_root_level(sb);
>> tree_root->node = read_tree_block(fs_info, btrfs_super_root(sb),
>> generation, level, NULL);
>> - if (IS_ERR(tree_root->node) ||
>> - !extent_buffer_uptodate(tree_root->node)) {
>> + if (IS_ERR(tree_root->node)) {
>> handle_error = true;
>> + ret = PTR_ERR(tree_root->node);
>> + tree_root->node = NULL;
>> + btrfs_warn(fs_info, "failed to read tree root");
>> + continue;
>
> [...]
>
>> btrfs_warn(fs_info, "failed to read tree root");
>> continue;
>> }
>
> Now we're duplicating the warning message. I think it's better to have two
> distinct messages so we can differentiate which of the two failure cases happened.
>
> The 2nd one could be something like "tree root eb not uptodate".
Sure, I'm happy too replace it with whatever is more informative. Will
take another look at the code and see what I can derive.
>
> Otherwise looks good,
> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
>
next prev parent reply other threads:[~2020-08-04 15:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-04 7:32 [PATCH] btrfs: Rework error detection in init_tree_roots Nikolay Borisov
2020-08-04 12:58 ` Johannes Thumshirn
2020-08-04 15:02 ` Nikolay Borisov [this message]
2020-08-10 15:53 ` David Sterba
2020-08-12 13:16 ` [PATCH v2] " Nikolay Borisov
2020-08-27 7:02 ` Nikolay Borisov
2020-08-27 12:37 ` 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=327aaaeb-affd-e762-921d-f2f823eec3bc@suse.com \
--to=nborisov@suse.com \
--cc=Johannes.Thumshirn@wdc.com \
--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