On 2019/11/11 下午4:42, damenly.su@xxxxxxxxx wrote: > From: Su Yue <Damenly_Su@xxxxxxx> > > 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@xxxxxxx> > --- > 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:
signature.asc
Description: OpenPGP digital signature
