diff options
author | David Sterba <dsterba@suse.com> | 2022-10-27 03:02:32 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-12-05 20:00:51 +0300 |
commit | 19af6a7d345acc885f970d57577fa80ca4ad3d98 (patch) | |
tree | f7f25d7ec1d1a30e6e54b0f860d7f4f318920990 /fs/btrfs/extent_io.h | |
parent | 961f5b8bf48a463ac5fe5b13143426d79eb41817 (diff) | |
download | linux-19af6a7d345acc885f970d57577fa80ca4ad3d98.tar.xz |
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>
Diffstat (limited to 'fs/btrfs/extent_io.h')
-rw-r--r-- | fs/btrfs/extent_io.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index a5ec1475988f..321680f229c6 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h @@ -70,10 +70,6 @@ struct extent_io_tree; int __init extent_buffer_init_cachep(void); void __cold extent_buffer_free_cachep(void); -typedef void (submit_bio_hook_t)(struct inode *inode, struct bio *bio, - int mirror_num, - enum btrfs_compression_type compress_type); - typedef blk_status_t (extent_submit_bio_start_t)(struct inode *inode, struct bio *bio, u64 dio_file_offset); @@ -277,7 +273,7 @@ struct io_failure_record { int btrfs_repair_one_sector(struct inode *inode, struct btrfs_bio *failed_bbio, u32 bio_offset, struct page *page, unsigned int pgoff, - submit_bio_hook_t *submit_bio_hook); + bool submit_buffered); void btrfs_free_io_failure_record(struct btrfs_inode *inode, u64 start, u64 end); int btrfs_clean_io_failure(struct btrfs_inode *inode, u64 start, struct page *page, unsigned int pg_offset); |