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>