btrfs: add test for multiple fsync with adjacent preallocated extents
authorFilipe Manana <fdmanana@suse.com>
Mon, 24 May 2021 10:37:21 +0000 (11:37 +0100)
committerEryu Guan <guaneryu@gmail.com>
Sun, 30 May 2021 12:16:50 +0000 (20:16 +0800)
commit2605c135e15cd07fcedc3a5cc26b58dc77659bab
tree8a949f63972ad229f48901cd912b57c930c25dd0
parentee7383c5f54c8408ef941fc82a07fb1b8fe0afee
btrfs: add test for multiple fsync with adjacent preallocated extents

Test a scenario where we do several partial writes into multiple
preallocated extents across two transactions and with several fsyncs
in between. The goal is to check that the fsyncs succeed.

Currently the last fsync fails with an -EIO error, and it aborts the
current transaction. This issue is fixed by a patch with the following
subject:

  "btrfs: fix fsync failure and transaction abort after writes to prealloc extents"

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/btrfs/240 [new file with mode: 0755]
tests/btrfs/240.out [new file with mode: 0644]
tests/btrfs/group