From: Qu WenRuo <wqu@suse.com>
To: Anand Jain <anand.jain@oracle.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH v2 1/3] btrfs: block-group: Refactor btrfs_read_block_groups()
Date: Wed, 9 Oct 2019 12:14:38 +0000 [thread overview]
Message-ID: <7ad1bf89-2217-6b48-749a-af4cb47b7447@suse.com> (raw)
In-Reply-To: <d4b783b7-6706-e32e-d57e-946b27a8d833@oracle.com>
On 2019/10/9 下午8:08, Anand Jain wrote:
> On 10/8/19 12:49 PM, Qu Wenruo wrote:
>> Refactor the work inside the loop of btrfs_read_block_groups() into one
>> separate function, read_one_block_group().
>>
>> This allows read_one_block_group to be reused for later BG_TREE feature.
>>
>> Signed-off-by: Qu Wenruo <wqu@suse.com>
>
> Nit: Change log didn't mention about things which is also fixed here.
> 1. The incompatible feature check cleanups.
>
> + int mixed = btrfs_fs_incompat(info, MIXED_GROUPS);
>
> 2. The bug we failed to call "btrfs_put_block_group(cache);" at [1]
>
> -----------------
> - if (!mixed &&
> - ((cache->flags & BTRFS_BLOCK_GROUP_METADATA) &&
> - (cache->flags & BTRFS_BLOCK_GROUP_DATA))) {
> - btrfs_err(info,
> -"bg %llu is a mixed block group but filesystem hasn't enabled mixed
> block groups",
> - cache->key.objectid);
> - ret = -EINVAL; <---- [1]
> + btrfs_item_key_to_cpu(path->nodes[0], &key,
> path->slots[0]);
> + ret = read_one_block_group(info, path, need_clear);
> + if (ret < 0)
> goto error;
> - }
> -----------------
Thanks for catching that!
In fact I remembered I fixed an error out problem, but by somehow I
didn't found it in the patch/diff.
I'll send out a small update for this one and update my github branch.
Thanks,
Qu
>
> Otherwise looks good.
>
> Reviewed-by: Anand Jain <anand.jain@oracle.com>
>
> Thanks, Anand
>
next prev parent reply other threads:[~2019-10-09 12:15 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 [this message]
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
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=7ad1bf89-2217-6b48-749a-af4cb47b7447@suse.com \
--to=wqu@suse.com \
--cc=anand.jain@oracle.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;
as well as URLs for NNTP newsgroup(s).