mirror of
https://github.com/kdave/btrfs-progs
synced 2025-04-10 03:01:28 +00:00
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:
parent
899977cd18
commit
97fc76c0ac
@ -164,6 +164,10 @@ err:
|
|||||||
return 0;
|
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
|
struct btrfs_block_group_cache *btrfs_lookup_first_block_group(struct
|
||||||
btrfs_fs_info *info,
|
btrfs_fs_info *info,
|
||||||
u64 bytenr)
|
u64 bytenr)
|
||||||
@ -193,6 +197,9 @@ struct btrfs_block_group_cache *btrfs_lookup_first_block_group(struct
|
|||||||
return block_group;
|
return block_group;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Return the block group that contains the given @bytenr
|
||||||
|
*/
|
||||||
struct btrfs_block_group_cache *btrfs_lookup_block_group(struct
|
struct btrfs_block_group_cache *btrfs_lookup_block_group(struct
|
||||||
btrfs_fs_info *info,
|
btrfs_fs_info *info,
|
||||||
u64 bytenr)
|
u64 bytenr)
|
||||||
|
Loading…
Reference in New Issue
Block a user