From: Anand Jain <anand.jain@oracle.com>
To: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2 2/3] btrfs: disk-io: Remove unnecessary check before freeing chunk root
Date: Thu, 10 Oct 2019 10:00:12 +0800 [thread overview]
Message-ID: <a51926df-f18b-68dc-9241-7e9df1164199@oracle.com> (raw)
In-Reply-To: <20191008044909.157750-3-wqu@suse.com>
On 8/10/19 12:49 PM, Qu Wenruo wrote:
> In free_root_pointers(), free_root_extent_buffers() has checked if the
> @root parameter is NULL.
> So there is no need checking chunk_root before freeing it.
um..
> Signed-off-by: Qu Wenruo <wqu@suse.com>
> ---
> fs/btrfs/disk-io.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> index 044981cf6df9..bfeeac83b952 100644
> --- a/fs/btrfs/disk-io.c
> +++ b/fs/btrfs/disk-io.c
> @@ -2038,8 +2038,7 @@ static void free_root_pointers(struct btrfs_fs_info *info, int chunk_root)
> free_root_extent_buffers(info->csum_root);
> free_root_extent_buffers(info->quota_root);
> free_root_extent_buffers(info->uuid_root);
> - if (chunk_root)
> - free_root_extent_buffers(info->chunk_root);
> + free_root_extent_buffers(info->chunk_root);
> free_root_extent_buffers(info->free_space_root);
> }
>
>
This will cause the regression and fails mount from the backup root.
We have %recovery_tree_root: which shall re-read all the trees root
except the chunk root.
I don't think your idea was to re-read the chunk root as well?.
-----------------
recovery_tree_root:
if (!btrfs_test_opt(fs_info, USEBACKUPROOT))
goto fail_tree_roots;
free_root_pointers(fs_info, 0);
-----------------
Thanks, Anand
next prev parent reply other threads:[~2019-10-10 2:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-08 4:49 [PATCH v2 0/3] btrfs: Introduce new incompat feature BG_TREE to hugely reduce mount time Qu Wenruo
2019-10-08 4:49 ` [PATCH v2 1/3] btrfs: block-group: Refactor btrfs_read_block_groups() Qu Wenruo
2019-10-08 9:08 ` Johannes Thumshirn
2019-10-09 12:08 ` Anand Jain
2019-10-09 12:14 ` Qu WenRuo
2019-10-09 13:07 ` [PATCH " Qu Wenruo
2019-10-09 14:25 ` Filipe Manana
2019-10-08 4:49 ` [PATCH v2 2/3] btrfs: disk-io: Remove unnecessary check before freeing chunk root Qu Wenruo
2019-10-08 8:30 ` Johannes Thumshirn
2019-10-10 2:00 ` Anand Jain [this message]
2019-10-10 2:21 ` Qu Wenruo
2019-10-08 4:49 ` [PATCH v2 3/3] btrfs: Introduce new incompat feature, BG_TREE, to speed up mount time Qu Wenruo
2019-10-08 9:09 ` Johannes Thumshirn
2019-10-08 9:14 ` [PATCH v2 0/3] btrfs: Introduce new incompat feature BG_TREE to hugely reduce " Johannes Thumshirn
2019-10-08 9:26 ` Qu Wenruo
2019-10-08 9:47 ` Johannes Thumshirn
[not found] ` <b4821d86-eeb9-f21c-66aa-480df2d3a13d@feldspaten.org>
2019-10-09 7:43 ` Qu Wenruo
2019-10-09 8:08 ` Felix Niederwanger
2019-10-09 11:00 ` Qu Wenruo
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=a51926df-f18b-68dc-9241-7e9df1164199@oracle.com \
--to=anand.jain@oracle.com \
--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;
as well as URLs for NNTP newsgroup(s).