提交 9689457b 编写于 作者: S Shilong Wang 提交者: Chris Mason

Btrfs: fix wrong check for btrfs_force_chunk_alloc()

btrfs_force_chunk_alloc() return 1 for allocation chunk successfully.
This problem exists since commit c87f08ca.

With this patch, we might fix some enospc problems for balances.
Signed-off-by: NWang Shilong <wangshilong1991@gmail.com>
Reviewed-by: NFilipe Manana <fdmanana@suse.com>
Tested-by: NFilipe Manana <fdmanana@suse.com>
Signed-off-by: NChris Mason <clm@fb.com>
上级 ddba1bfc
......@@ -4049,7 +4049,7 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc)
if (trans && progress && err == -ENOSPC) {
ret = btrfs_force_chunk_alloc(trans, rc->extent_root,
rc->block_group->flags);
if (ret == 0) {
if (ret == 1) {
err = 0;
progress = 0;
goto restart;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册