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>
This commit is contained in:
Filipe Manana
2020-10-20 15:43:01 +01:00
committed by Eryu Guan
parent 4504deda8b
commit a7fdd2e1b1
3 changed files with 211 additions and 0 deletions
+1
View File
@@ -227,3 +227,4 @@
223 auto quick replace trim
224 auto quick qgroup
225 auto quick volume seed
226 auto quick rw snapshot clone prealloc punch