mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-25 07:32:22 +00:00
btrfs-progs: extent-tree: avoid allocating tree block that crosses stripe boundary
Now find_free_extent() function won't return a metadata extent that crosses stripe boundary. Reported-by: Chris Murphy <lists@colorremedies.com> Reported-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
595c57d2f4
commit
854437ca3c
@ -2605,6 +2605,11 @@ check_failed:
|
||||
}
|
||||
|
||||
if (!(data & BTRFS_BLOCK_GROUP_DATA)) {
|
||||
if (check_crossing_stripes(ins->objectid, num_bytes)) {
|
||||
search_start = round_down(ins->objectid + num_bytes,
|
||||
BTRFS_STRIPE_LEN);
|
||||
goto new_group;
|
||||
}
|
||||
block_group = btrfs_lookup_block_group(info, ins->objectid);
|
||||
if (block_group)
|
||||
trans->block_group = block_group;
|
||||
|
Loading…
Reference in New Issue
Block a user