From 97fc76c0ac0b3cfb98fd80b5844f37b92f0a022d Mon Sep 17 00:00:00 2001 From: Su Yue Date: Mon, 11 Nov 2019 16:42:25 +0800 Subject: [PATCH] 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 Signed-off-by: David Sterba --- extent-tree.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/extent-tree.c b/extent-tree.c index d38303b0..53be4f4c 100644 --- a/extent-tree.c +++ b/extent-tree.c @@ -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)