Files
apfstests/tests/btrfs/226.out
T
Filipe Manana a7fdd2e1b1 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>
2020-10-25 14:29:29 +08:00

71 lines
2.3 KiB
Plaintext

QA output created by 226
Testing write against COW file
wrote 131072/131072 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
pwrite: Resource temporarily unavailable
File data after write attempt:
0000000 ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab
*
0131072
Testing write against extent shared across snapshots
wrote 65536/65536 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
wrote 65536/65536 bytes at offset 65536
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Create a snapshot of 'SCRATCH_MNT' in 'SCRATCH_MNT/snap'
wrote 65536/65536 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
pwrite: Resource temporarily unavailable
File data after write attempt:
0000000 ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab
*
0065536 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd
*
0131072
Testing write against shared extent through reflink
wrote 65536/65536 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
linked 65536/65536 bytes at offset 65536
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
pwrite: Resource temporarily unavailable
File data after write attempt:
0000000 ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab
*
0065536 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd
*
0131072
Testing write against prealloc extent at eof
wrote 65536/65536 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
wrote 65536/65536 bytes at offset 65536
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
File after write:
0000000 ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab
*
0065536 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd
*
0131072
Testing writes against ranges with holes
wrote 65536/65536 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
wrote 65536/65536 bytes at offset 65536
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
wrote 65536/65536 bytes at offset 196608
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
pwrite: Resource temporarily unavailable
pwrite: Resource temporarily unavailable
File data after write attempt:
0000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0065536 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd
*
0131072 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0196608 ef ef ef ef ef ef ef ef ef ef ef ef ef ef ef ef
*
0262144