[PATCH 1/2] btrfs-progs: add comments of block group lookup functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
+ */
 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)
-- 
2.23.0




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux