]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Fix no_space in write and rm loop
authorZhao Lei <zhaolei@cn.fujitsu.com>
Tue, 1 Dec 2015 10:39:40 +0000 (18:39 +0800)
committerChris Mason <clm@fb.com>
Wed, 20 Jan 2016 15:22:14 +0000 (07:22 -0800)
commitcd28317b6bdc010353cc5b83ba50dcec2b6a3133
treefb140445ed587ff5c0bbdbea6e06fa659b106c92
parente49eae70fb8c52fe3496d3cf20dbf57614d3dbc5
btrfs: Fix no_space in write and rm loop

I see no_space in v4.4-rc1 again in xfstests generic/102.
It happened randomly in some node only.
(one of 4 phy-node, and a kvm with non-virtio block driver)

By bisect, we can found the first-bad is:
 commit 55d1b8b6a860 ("block: setup bi_phys_segments after splitting")'
But above patch only triggered the bug by making bio operation
faster(or slower).

Main reason is in our space_allocating code, we need to commit
page writeback before wait it complish, this patch fixed above
bug.

BTW, there is another reason for generic/102 fail, caused by
disable default mixed-blockgroup, I'll fix it in xfstests.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/extent-tree.c