Re: [PATCH 05/10] btrfs-progs: adjust function btrfs_lookup_first_block_group_kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2019/12/5 下午12:29, damenly.su@xxxxxxxxx wrote:
> From: Su Yue <Damenly_Su@xxxxxxx>
> 
> The are different behavior of btrfs_lookup_first_block_group() and
> btrfs_lookup_first_block_group_kernel(). Unify the latter' behavior.
> 
> Signed-off-by: Su Yue <Damenly_Su@xxxxxxx>

Is it possible to modify the specific callers in btrfs-progs to make
them use the kernel behavior other than re-inventing some new behavior?

Thanks,
Qu

> ---
>  extent-tree.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/extent-tree.c b/extent-tree.c
> index 1d8535049eaf..274dfe540b1f 100644
> --- a/extent-tree.c
> +++ b/extent-tree.c
> @@ -243,12 +243,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, 2);
>  }
>  
>  /*
> 

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux