Files
apfstests/tests/generic/512.out
T
Filipe Manana 2b621418f4 generic: test fsync after fallocate on a very small file
Test that if we have a very small file, with a size smaller than the
block size, then fallocate a very small range within the block size
but past the file's current size, fsync the file and then power
fail, after mounting the filesystem all the file data is there and
the file size is correct.

This test is motivated by a failure in btrfs where it triggered an
assertion when using the no-holes feature, that is, when running
with MKFS_OPTIONS="-O no-holes". The btrfs issue is fixed by a patch
for the linux kernel titled:

 "Btrfs: fix assertion on fsync of regular file when using no-holes
  feature"

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2018-10-21 17:31:48 +08:00

10 lines
326 B
Plaintext

QA output created by 512
wrote 21/21 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
File content after power failure:
0000000 b6 b6 b6 b6 b6 b6 b6 b6 b6 b6 b6 b6 b6 b6 b6 b6
0000016 b6 b6 b6 b6 b6 00 00 00 00 00 00 00 00 00 00 00
0000032 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0000080