OSDN Git Service

btrfs: unify buffered and direct I/O read repair
authorOmar Sandoval <osandov@fb.com>
Thu, 16 Apr 2020 21:46:25 +0000 (14:46 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 May 2020 09:25:27 +0000 (11:25 +0200)
commit77d5d6893106ea7b19709bed2491f93ff10a86d7
tree9477302de473050864880d6aa7618c2173cb664d
parent5c047a699aa9433ad92136343a9306d985134c24
btrfs: unify buffered and direct I/O read repair

Currently, direct I/O has its own versions of bio_readpage_error() and
btrfs_check_repairable() (dio_read_error() and
btrfs_check_dio_repairable(), respectively). The main difference is that
the direct I/O version doesn't do read validation. The rework of direct
I/O repair makes it possible to do validation, so we can get rid of
btrfs_check_dio_repairable() and combine bio_readpage_error() and
dio_read_error() into a new helper, btrfs_submit_read_repair().

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h
fs/btrfs/inode.c