btrfs: test direct IO write against compressed extent

Test that doing a direct IO write against a file range that contains one
prealloc extent and one compressed extent works correctly.

From the linux kernel 4.0 onwards, this either triggered an assertion
failure (leading to a BUG_ON) when CONFIG_BTRFS_ASSERT=y or resulted
in an arithmetic underflow of an inode's space reservation for write
operations.

That issue is fixed by the following linux kernel patch:

  "Btrfs: fix extent accounting for partial direct IO writes"

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Filipe Manana
2015-12-21 17:03:17 +11:00
committed by Dave Chinner
parent e597459397
commit e8341568c1
3 changed files with 124 additions and 0 deletions
+1
View File
@@ -28,6 +28,7 @@
023 auto
024 auto quick compress
025 auto quick send clone
026 auto quick compress prealloc
029 auto quick clone
030 auto quick send
031 auto quick subvol clone