提交 3bf3d9e9 编写于 作者: C Chris Mason

Btrfs: Avoid recursive chunk allocations

Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 8f18cf13
...@@ -1727,7 +1727,7 @@ int btrfs_alloc_extent(struct btrfs_trans_handle *trans, ...@@ -1727,7 +1727,7 @@ int btrfs_alloc_extent(struct btrfs_trans_handle *trans,
data = BTRFS_BLOCK_GROUP_METADATA | alloc_profile; data = BTRFS_BLOCK_GROUP_METADATA | alloc_profile;
} }
again: again:
if (root != root->fs_info->extent_root) { if (root->ref_cows) {
if (!(data & BTRFS_BLOCK_GROUP_METADATA)) { if (!(data & BTRFS_BLOCK_GROUP_METADATA)) {
ret = do_chunk_alloc(trans, root->fs_info->extent_root, ret = do_chunk_alloc(trans, root->fs_info->extent_root,
2 * 1024 * 1024, 2 * 1024 * 1024,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册