Commit 89d4346a authored by Miao Xie's avatar Miao Xie Committed by Chris Mason
Browse files

Btrfs: fix wrong block group in trace during the free space allocation



We allocate the free space from the former block group, not the current
one, so should use the former one to output the trace information.
Signed-off-by: default avatarMiao Xie <miaox@cn.fujitsu.com>
Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 215a63d1
......@@ -6323,7 +6323,8 @@ static noinline int find_free_extent(struct btrfs_root *orig_root,
/* we have a block, we're done */
spin_unlock(&last_ptr->refill_lock);
trace_btrfs_reserve_extent_cluster(root,
block_group, search_start, num_bytes);
used_block_group,
search_start, num_bytes);
if (used_block_group != block_group) {
btrfs_put_block_group(block_group);
block_group = used_block_group;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment