]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
generic: truncate after a mix of dio and buffered writes
authorFilipe Manana <fdmanana@suse.com>
Tue, 14 Feb 2017 20:36:17 +0000 (20:36 +0000)
committerEryu Guan <eguan@redhat.com>
Sat, 18 Feb 2017 23:59:08 +0000 (07:59 +0800)
commitb665875fa5eb19c450b0dd5da7e3ff92e2314b14
tree73e710da77ef482f7739dc9323f5d8f38a6fa0a2
parentc8abfdd9303bed8db9a26646b8c47d1072c0d51a
generic: truncate after a mix of dio and buffered writes

Test that if we have a file with a hole, do a mix of direct IO and
buffered writes to it and truncate the file to a size that lies in
the middle of the hole, after unmounting and mounting again the
filesystem, the file has a correct size and no data loss happened.

This test is motivated by a bug found in btrfs when used with the
no-holes feature (i.e. MKFS_OPTIONS="-O no-holes") which is fixed by
the following patch for the linux kernel:

  Btrfs: fix data loss after truncate when using the no-holes feature

[eguan: add _require_odirect]

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/generic/412 [new file with mode: 0755]
tests/generic/412.out [new file with mode: 0644]
tests/generic/group