]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
Btrfs: add extent map selftests
authorLiu Bo <bo.li.liu@oracle.com>
Fri, 5 Jan 2018 19:51:12 +0000 (12:51 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 22 Jan 2018 15:08:22 +0000 (16:08 +0100)
commit72b28077a20a6a1f14494602466c219241f45d89
tree9cf7c34853eeb564ff4f906a9d1d4a48ef562975
parentc04e61b5e41b0e8ace4aa4b67685fbe68ac37a46
Btrfs: add extent map selftests

We've observed that btrfs_get_extent() and merge_extent_mapping() could
return -EEXIST in several cases, and they are caused by some racy
condition, e.g dio read vs dio write, which makes the problem very tricky
to reproduce.

This adds extent map selftests in order to simulate those racy situations.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
[ minor string adjustments ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/Makefile
fs/btrfs/tests/btrfs-tests.c
fs/btrfs/tests/btrfs-tests.h
fs/btrfs/tests/extent-map-tests.c [new file with mode: 0644]