Now find_free_extent() function won't return a metadata extent that
cross stripe boundary.
Reported-by: Chris Murphy <lists@xxxxxxxxxxxxxxxxx>
Reported-by: Zhao Lei <zhaolei@xxxxxxxxxxxxxx>
Signed-off-by: Zhao Lei <zhaolei@xxxxxxxxxxxxxx>
Signed-off-by: Qu Wenruo <quwenruo@xxxxxxxxxxxxxx>
---
extent-tree.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/extent-tree.c b/extent-tree.c
index ac582e0..6f07e4b 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -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;
--
2.4.6
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html