#include <linux/bio.h>
#include "bio.h"
#include "ctree.h"
#include "volumes.h"
#include "raid56.h"
#include "async-thread.h"
#include "dev-replace.h"
#include "zoned.h"
#include "file-item.h"
#include "raid-stripe-tree.h"
static struct bio_set btrfs_bioset;
static struct bio_set btrfs_clone_bioset;
static struct bio_set btrfs_repair_bioset;
static mempool_t btrfs_failed_bio_pool;
struct btrfs_failed_bio { … };
static inline bool is_data_bbio(struct btrfs_bio *bbio)
{ … }
static bool bbio_has_ordered_extent(struct btrfs_bio *bbio)
{ … }
void btrfs_bio_init(struct btrfs_bio *bbio, struct btrfs_fs_info *fs_info,
btrfs_bio_end_io_t end_io, void *private)
{ … }
struct btrfs_bio *btrfs_bio_alloc(unsigned int nr_vecs, blk_opf_t opf,
struct btrfs_fs_info *fs_info,
btrfs_bio_end_io_t end_io, void *private)
{ … }
static struct btrfs_bio *btrfs_split_bio(struct btrfs_fs_info *fs_info,
struct btrfs_bio *orig_bbio,
u64 map_length, bool use_append)
{ … }
static void btrfs_cleanup_bio(struct btrfs_bio *bbio)
{ … }
static void __btrfs_bio_end_io(struct btrfs_bio *bbio)
{ … }
void btrfs_bio_end_io(struct btrfs_bio *bbio, blk_status_t status)
{ … }
static void btrfs_orig_write_end_io(struct bio *bio);
static void btrfs_bbio_propagate_error(struct btrfs_bio *bbio,
struct btrfs_bio *orig_bbio)
{ … }
static void btrfs_orig_bbio_end_io(struct btrfs_bio *bbio)
{ … }
static int next_repair_mirror(struct btrfs_failed_bio *fbio, int cur_mirror)
{ … }
static int prev_repair_mirror(struct btrfs_failed_bio *fbio, int cur_mirror)
{ … }
static void btrfs_repair_done(struct btrfs_failed_bio *fbio)
{ … }
static void btrfs_end_repair_bio(struct btrfs_bio *repair_bbio,
struct btrfs_device *dev)
{ … }
static struct btrfs_failed_bio *repair_one_sector(struct btrfs_bio *failed_bbio,
u32 bio_offset,
struct bio_vec *bv,
struct btrfs_failed_bio *fbio)
{ … }
static void btrfs_check_read_bio(struct btrfs_bio *bbio, struct btrfs_device *dev)
{ … }
static void btrfs_log_dev_io_error(struct bio *bio, struct btrfs_device *dev)
{ … }
static struct workqueue_struct *btrfs_end_io_wq(struct btrfs_fs_info *fs_info,
struct bio *bio)
{ … }
static void btrfs_end_bio_work(struct work_struct *work)
{ … }
static void btrfs_simple_end_io(struct bio *bio)
{ … }
static void btrfs_raid56_end_io(struct bio *bio)
{ … }
static void btrfs_orig_write_end_io(struct bio *bio)
{ … }
static void btrfs_clone_write_end_io(struct bio *bio)
{ … }
static void btrfs_submit_dev_bio(struct btrfs_device *dev, struct bio *bio)
{ … }
static void btrfs_submit_mirrored_bio(struct btrfs_io_context *bioc, int dev_nr)
{ … }
static void __btrfs_submit_bio(struct bio *bio, struct btrfs_io_context *bioc,
struct btrfs_io_stripe *smap, int mirror_num)
{ … }
static blk_status_t btrfs_bio_csum(struct btrfs_bio *bbio)
{ … }
struct async_submit_bio { … };
static void run_one_async_start(struct btrfs_work *work)
{ … }
static void run_one_async_done(struct btrfs_work *work, bool do_free)
{ … }
static bool should_async_write(struct btrfs_bio *bbio)
{ … }
static bool btrfs_wq_submit_bio(struct btrfs_bio *bbio,
struct btrfs_io_context *bioc,
struct btrfs_io_stripe *smap, int mirror_num)
{ … }
static bool btrfs_submit_chunk(struct btrfs_bio *bbio, int mirror_num)
{ … }
void btrfs_submit_bio(struct btrfs_bio *bbio, int mirror_num)
{ … }
int btrfs_repair_io_failure(struct btrfs_fs_info *fs_info, u64 ino, u64 start,
u64 length, u64 logical, struct folio *folio,
unsigned int folio_offset, int mirror_num)
{ … }
void btrfs_submit_repair_write(struct btrfs_bio *bbio, int mirror_num, bool dev_replace)
{ … }
int __init btrfs_bioset_init(void)
{ … }
void __cold btrfs_bioset_exit(void)
{ … }