generic: do operations which doesn't take data space on full fs
authorQu Wenruo <wqu@suse.com>
Wed, 8 May 2019 14:04:05 +0000 (22:04 +0800)
committerEryu Guan <guaneryu@gmail.com>
Fri, 10 May 2019 09:21:42 +0000 (17:21 +0800)
commit2bb2dd24cc9e8fb5ddf733c59f05a6884c0a1d6b
treee7508e82b10498e93585400888aa158b45334d89
parent80bac2129b0619064ac5bda6e1822765fc95cf71
generic: do operations which doesn't take data space on full fs

This test will test if we can still do the following operations when a
full is full:
- buffered write into unpopulated preallocated extent
- clone the untouched preallocated extent
- fsync
- no data loss if power loss happens after above fsync
Above operations should not fail, as they takes no extra data space.

Xfs passes the test, while btrfs fails at fsync and has data loss.
The fix for btrfs is:
"btrfs: Flush before reflinking any extent to prevent NOCOW write falling
 back to CoW without data reservation"

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/546 [new file with mode: 0755]
tests/generic/546.out [new file with mode: 0644]
tests/generic/group