btrfs: Check false ENOSPC bug caused by incorrect metadata reserve

Due to the fact that btrfs uses different max extent size for
compressed and non-compressed write, it calculates metadata
reservation incorrectly.

This can leads to false ENOSPC alert for compressed write.

This test case will check it by using small fs and do parallel write
to trigger it.

It's highly recommened to use MOUNT_OPTIONS="-o compress" and
MKFS_OPTIONS="-n 64k" to trigger it. Without compression, it won't
be triggered.

The fix is not merged and may change in the future, but the function
is good enough:

btrfs: improve inode's outstanding_extents computation
btrfs: fix false enospc for compression

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
Qu Wenruo
2016-11-10 11:18:48 +08:00
committed by Eryu Guan
parent 08adb2554e
commit 089ecbf486
3 changed files with 106 additions and 0 deletions
+1
View File
@@ -134,3 +134,4 @@
129 auto quick send
130 auto clone send
131 auto quick
132 auto enospc