generic: test deadlock on O_DIRECT|O_DSYNC
authorJosef Bacik <josef@toxicpanda.com>
Wed, 2 Sep 2020 17:10:36 +0000 (13:10 -0400)
committerEryu Guan <guaneryu@gmail.com>
Sun, 13 Sep 2020 15:04:12 +0000 (23:04 +0800)
commit47306c8951bca25873609100e50c6e6432c7da17
treec74f2887fb9505afe8249bcbefe0f6eec97f9ea8
parent4a109ce8d36c5d10f81209a928cdaf60671d8469
generic: test deadlock on O_DIRECT|O_DSYNC

We had a problem recently where btrfs would deadlock with
O_DIRECT|O_DSYNC because of an unexpected dependency on ->fsync in
iomap.  This was only caught by chance with aiostress, because weirdly
we don't actually test this particular configuration anywhere in
xfstests.  Fix this by adding a basic test that just does
O_DIRECT|O_DSYNC writes.  With this test the box deadlocks right away
with Btrfs, which would have been helpful in finding this issue before
the patches were merged.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/609 [new file with mode: 0755]
tests/generic/609.out [new file with mode: 0644]
tests/generic/group