btrfs-progs: add comments of block group lookup functions

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>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Su Yue 2019-11-11 16:42:25 +08:00 committed by David Sterba
parent 899977cd18
commit 97fc76c0ac
1 changed files with 7 additions and 0 deletions

View File

@ -164,6 +164,10 @@ err:
return 0;
}
/*
* 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(struct
btrfs_fs_info *info,
u64 bytenr)
@ -193,6 +197,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)