From: Su Yue <Damenly_Su@gmx.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>,
damenly.su@gmail.com, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH V2 05/10] btrfs-progs: adjust ported block group lookup functions in kernel version
Date: Wed, 18 Dec 2019 19:01:48 +0800 [thread overview]
Message-ID: <b0a7e353-5745-5f1e-c9c7-e6bda3fe8ae2@gmx.com> (raw)
In-Reply-To: <b87626bd-911c-8fcd-4713-58968458e078@gmx.com>
On 2019/12/18 5:52 PM, Qu Wenruo wrote:
>
>
> On 2019/12/18 下午1:18, damenly.su@gmail.com wrote:
>> From: Su Yue <Damenly_Su@gmx.com>
>>
>> The are different behavior of btrfs_lookup_first_block_group() and
>> btrfs_lookup_first_block_group_kernel().
>> There are many palaces calling the lookup function include extent
>> allocation part. It's too complicated to check and change those.
>> It will influence many functionalities in progs.
>>
>> So here, just make kernel version lookup functions run likely in
>> progs behavior.
>>
>> Signed-off-by: Su Yue <Damenly_Su@gmx.com>
>
> It should be folded into previous commit, or this will break bisect.
>
Oh, will do.
Thanks for your review.
> Thanks,
> Qu
>
>> ---
>> extent-tree.c | 7 ++++---
>> 1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/extent-tree.c b/extent-tree.c
>> index fdfa29a2409f..3f7b82dc88a2 100644
>> --- a/extent-tree.c
>> +++ b/extent-tree.c
>> @@ -238,12 +238,13 @@ static struct btrfs_block_group_cache *block_group_cache_tree_search(
>> }
>>
>> /*
>> - * Return the block group that starts at or after bytenr
>> + * Return the block group that contains @bytenr, otherwise return the next one
>> + * that starts after @bytenr
>> */
>> struct btrfs_block_group_cache *btrfs_lookup_first_block_group_kernel(
>> struct btrfs_fs_info *info, u64 bytenr)
>> {
>> - return block_group_cache_tree_search(info, bytenr, 0);
>> + return block_group_cache_tree_search(info, bytenr, 1);
>> }
>>
>> /*
>> @@ -252,7 +253,7 @@ struct btrfs_block_group_cache *btrfs_lookup_first_block_group_kernel(
>> struct btrfs_block_group_cache *btrfs_lookup_block_group_kernel(
>> struct btrfs_fs_info *info, u64 bytenr)
>> {
>> - return block_group_cache_tree_search(info, bytenr, 1);
>> + return block_group_cache_tree_search(info, bytenr, 0);
>> }
>>
>> /*
>>
>
next prev parent reply other threads:[~2019-12-18 11:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 5:18 [PATCH V2 00/10] unify origanization structure of block group cache damenly.su
2019-12-18 5:18 ` [PATCH V2 01/10] btrfs-progs: handle error if btrfs_write_one_block_group() failed damenly.su
2019-12-18 5:18 ` [PATCH V2 02/10] btrfs-progs: block_group: add rb tree related memebers damenly.su
2019-12-18 5:18 ` [PATCH V2 03/10] btrfs-progs: port block group cache tree insertion and lookup functions damenly.su
2019-12-18 5:18 ` [PATCH V2 04/10] btrfs-progs: reform the function block_group_cache_tree_search() damenly.su
2019-12-18 9:51 ` Qu Wenruo
2019-12-18 5:18 ` [PATCH V2 05/10] btrfs-progs: adjust ported block group lookup functions in kernel version damenly.su
2019-12-18 9:52 ` Qu Wenruo
2019-12-18 11:01 ` Su Yue [this message]
2019-12-18 5:18 ` [PATCH V2 06/10] btrfs-progs: abstract function btrfs_add_block_group_cache() damenly.su
2019-12-18 5:18 ` [PATCH V2 07/10] block-progs: block_group: add dirty_bgs list related memebers damenly.su
2019-12-18 5:18 ` [PATCH V2 08/10] btrfs-progs: pass @trans to functions touch dirty block groups damenly.su
2019-12-18 5:18 ` [PATCH V2 09/10] btrfs-progs: reform block groups caches structure damenly.su
2019-12-18 5:18 ` [PATCH V2 10/10] btrfs-progs: cleanups after block group cache reform damenly.su
2020-01-22 17:52 ` [PATCH V2 00/10] unify origanization structure of block group cache 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=b0a7e353-5745-5f1e-c9c7-e6bda3fe8ae2@gmx.com \
--to=damenly_su@gmx.com \
--cc=damenly.su@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.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