|
@@ -5560,7 +5560,7 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans,
|
|
int empty_cluster = 2 * 1024 * 1024;
|
|
int empty_cluster = 2 * 1024 * 1024;
|
|
struct btrfs_space_info *space_info;
|
|
struct btrfs_space_info *space_info;
|
|
int loop = 0;
|
|
int loop = 0;
|
|
- int index = 0;
|
|
|
|
|
|
+ int index = __get_raid_index(data);
|
|
int alloc_type = (data & BTRFS_BLOCK_GROUP_DATA) ?
|
|
int alloc_type = (data & BTRFS_BLOCK_GROUP_DATA) ?
|
|
RESERVE_ALLOC_NO_ACCOUNT : RESERVE_ALLOC;
|
|
RESERVE_ALLOC_NO_ACCOUNT : RESERVE_ALLOC;
|
|
bool found_uncached_bg = false;
|
|
bool found_uncached_bg = false;
|