OSDN Git Service

btrfs: change how repair action is passed to btrfs_repair_one_sector
authorDavid Sterba <dsterba@suse.com>
Thu, 27 Oct 2022 00:02:32 +0000 (02:02 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 5 Dec 2022 17:00:51 +0000 (18:00 +0100)
commit19af6a7d345acc885f970d57577fa80ca4ad3d98
treef7f25d7ec1d1a30e6e54b0f860d7f4f318920990
parent961f5b8bf48a463ac5fe5b13143426d79eb41817
btrfs: change how repair action is passed to btrfs_repair_one_sector

There's a function pointer passed to btrfs_repair_one_sector that will
submit the right bio for repair. However there are only two callbacks,
for buffered and for direct IO. This can be simplified to a bool-based
switch and call either function, indirect calls in this case is an
unnecessary abstraction. This allows to remove the submit_bio_hook_t
typedef.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/btrfs_inode.h
fs/btrfs/compression.c
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h
fs/btrfs/inode.c