linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: damenly.su@gmail.com, linux-btrfs@vger.kernel.org
Cc: Damenly_Su@gmx.com
Subject: Re: [PATCH 1/2] btrfs-progs: add comments of block group lookup functions
Date: Mon, 11 Nov 2019 17:28:00 +0800	[thread overview]
Message-ID: <97915605-5df1-ab83-ca98-3133b0648df9@gmx.com> (raw)
In-Reply-To: <20191111084226.475957-1-Damenly_Su@gmx.com>


[-- Attachment #1.1: Type: text/plain, Size: 1375 bytes --]



On 2019/11/11 下午4:42, damenly.su@gmail.com wrote:
> From: Su Yue <Damenly_Su@gmx.com>
> 
> The progs side function btrfs_lookup_first_block_group() calls
> find_first_extent_bit() to find block group which contains bytenr
> or after the bytenr. This behavior differs from kernel code, so
> add the comments.
> 
> Add the coments of btrfs_lookup_block_group() too, this one works
> like kernel side.
> 
> Signed-off-by: Su Yue <Damenly_Su@gmx.com>
> ---
>  extent-tree.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/extent-tree.c b/extent-tree.c
> index d67e4098351f..f690ae999f37 100644
> --- a/extent-tree.c
> +++ b/extent-tree.c
> @@ -164,6 +164,9 @@ err:
>  	return 0;
>  }
>  
> +/*
> + * Return the block group that contains or after bytenr
> + */

What about "Return the block group thart starts at or after @bytenr" ?

Thanks,
Qu

>  struct btrfs_block_group_cache *btrfs_lookup_first_block_group(struct
>  						       btrfs_fs_info *info,
>  						       u64 bytenr)
> @@ -193,6 +196,9 @@ struct btrfs_block_group_cache *btrfs_lookup_first_block_group(struct
>  	return block_group;
>  }
>  
> +/*
> + * Return the block group that contains the given bytenr
> + */
>  struct btrfs_block_group_cache *btrfs_lookup_block_group(struct
>  							 btrfs_fs_info *info,
>  							 u64 bytenr)
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2019-11-11  9:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11  8:42 [PATCH 1/2] btrfs-progs: add comments of block group lookup functions damenly.su
2019-11-11  8:42 ` [PATCH 2/2] btrfs-progs: check: call btrfs_lookup_block_group() instead in check_extent_type() damenly.su
2019-11-11  9:28 ` Qu Wenruo [this message]
2019-11-11  9:49   ` [PATCH 1/2] btrfs-progs: add comments of block group lookup functions Su Yue
2019-11-11 10:03     ` Qu Wenruo
2019-11-11 10:17       ` Su Yue
2019-11-15 16:17         ` David Sterba
2019-11-15 16:20 ` 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=97915605-5df1-ab83-ca98-3133b0648df9@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=Damenly_Su@gmx.com \
    --cc=damenly.su@gmail.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).