btrfs/14{2,3}: use dm-dust instead of fail_make_request
authorOmar Sandoval <osandov@fb.com>
Wed, 15 Apr 2020 20:54:31 +0000 (13:54 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 17 May 2020 16:25:17 +0000 (00:25 +0800)
commite2e468d4dd8581f752f5cd0cf6dc25378cb90da3
treee1f5a3d7676284acbceb9979085b632ca8ce80e6
parent1ee4e5f83d2ab9de257ef207b9f6c2131606c055
btrfs/14{2,3}: use dm-dust instead of fail_make_request

These two tests test direct I/O and buffered read repair, respectively,
with fail_make_request. However, by using "fail_make_request/times",
they rely on repair having a specific I/O pattern. My pending Btrfs
direct I/O refactoring patch series changes this I/O pattern and thus
breaks this test.

The dm-dust target (added in v5.2) emulates a device with bad blocks
that are fixed when written to (like a device that remaps bad blocks).
This is exactly what we want for testing repair. Add some common dm-dust
helpers and update the tests to use dm-dust.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/dmdust [new file with mode: 0644]
tests/btrfs/142
tests/btrfs/143