btrfs: add test case for rwf_nowait writes
authorFilipe Manana <fdmanana@suse.com>
Tue, 20 Oct 2020 14:43:01 +0000 (15:43 +0100)
committerEryu Guan <guaneryu@gmail.com>
Sun, 25 Oct 2020 06:29:29 +0000 (14:29 +0800)
commita7fdd2e1b1dc028faf021223d3d550a593689b96
treee356fa3af9108c017d407fc56a65850ac7c5a021
parent4504deda8ba78af1f995926c888f3a5155bd260c
btrfs: add test case for rwf_nowait writes

Test several scenarios for RWF_NOWAIT writes, to verify we don't regress
on btrfs specific behaviour (snapshots, cow files, reflinks, holes,
prealloc extent beyond eof).

We had some bugs in the past related to RWF_NOWAIT writes not failing on
btrfs when they should or failing when they shouldn't, these were fixed by
the following kernel commits:

  4b1946284dd6 ("btrfs: fix failure of RWF_NOWAIT write into prealloc extent beyond eof")
  260a63395f90 ("btrfs: fix RWF_NOWAIT write not failling when we need to cow")

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/btrfs/226 [new file with mode: 0755]
tests/btrfs/226.out [new file with mode: 0644]
tests/btrfs/group