btrfs: stress send with deduplication and balance running in parallel
authorFilipe Manana <fdmanana@suse.com>
Mon, 22 Apr 2019 15:44:16 +0000 (16:44 +0100)
committerEryu Guan <guaneryu@gmail.com>
Thu, 25 Apr 2019 07:30:58 +0000 (15:30 +0800)
commit8afebc02235eda1ec1c5a55ba9d37c0a881d88b3
tree80585049dd7743f90df4729c54855f0ec74c4a32
parent872050db3cac9cbcc3f89619eb3f36ae9861d239
btrfs: stress send with deduplication and balance running in parallel

Stress send running in parallel with balance and deduplication against
files that belong to the snapshots used by send. The goal is to verify
that these operations running in parallel do not lead to send crashing
(trigger assertion failures and BUG_ONs), or send finding an inconsistent
snapshot that leads to a failure (reported in dmesg/syslog). The test
needs big trees (snapshots) with large differences between the parent and
send snapshots in order to hit such issues with a good probability.

This currently fails on btrfs, hitting a BUG_ON() often, and with btrfs
error messages in dmesg/syslog. The problem has always existed and it is
not new, but probably unnoticed due to lack of test cases that exercise
these btrfs features running in parallel.

The following patches for btrfs fix the problems:

 "Btrfs: fix race between send and deduplication that lead to failures and
  crashes"

 "Btrfs: prevent send failures and crashes due to concurrent relocation"

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