return ret;
}
-static u64 first_logical_byte(struct btrfs_fs_info *fs_info, u64 search_start)
+static u64 first_logical_byte(struct btrfs_fs_info *fs_info)
{
struct btrfs_block_group *cache;
u64 bytenr;
if (bytenr < (u64)-1)
return bytenr;
- cache = btrfs_lookup_first_block_group(fs_info, search_start);
+ /* Get the block group with the lowest logical start address. */
+ cache = btrfs_lookup_first_block_group(fs_info, 0);
if (!cache)
return 0;
return ret;
ffe_ctl->search_start = max(ffe_ctl->search_start,
- first_logical_byte(fs_info, 0));
+ first_logical_byte(fs_info));
ffe_ctl->search_start = max(ffe_ctl->search_start, ffe_ctl->hint_byte);
if (ffe_ctl->search_start == ffe_ctl->hint_byte) {
block_group = btrfs_lookup_block_group(fs_info,