btrfs: test for deadlock between snapshot delete and other read-write operations
Commit
fb235dc06fac ("btrfs: qgroup: Move half of the qgroup
accounting time out of commit trans") could cause ABBA deadlock
between backref lookup with write lock hold (subvolume deletion) and
other read/write operations.
It's going to be fixed by "btrfs: qgroup: Don't trigger backref walk
at delayed ref insert time".
This test will generate pwrite background workload, along with
constant subvolume creation and deletion to trigger the bug.
It needs some time to generate enough files to bump the tree height
to trigger the bug.
In my test environment, with 'unsafe' cache mode for the VM, it
triggers the bug at around 70~90 seconds. So I leave the default
runtime to 120s to make sure the bug will be triggered.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>