#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/bio.h>
#include <linux/blkdev.h>
#include <linux/blk-integrity.h>
#include <linux/scatterlist.h>
#include <linux/part_stat.h>
#include <linux/blk-cgroup.h>
#include <trace/events/block.h>
#include "blk.h"
#include "blk-mq-sched.h"
#include "blk-rq-qos.h"
#include "blk-throttle.h"
static inline void bio_get_first_bvec(struct bio *bio, struct bio_vec *bv)
{ … }
static inline void bio_get_last_bvec(struct bio *bio, struct bio_vec *bv)
{ … }
static inline bool bio_will_gap(struct request_queue *q,
struct request *prev_rq, struct bio *prev, struct bio *next)
{ … }
static inline bool req_gap_back_merge(struct request *req, struct bio *bio)
{ … }
static inline bool req_gap_front_merge(struct request *req, struct bio *bio)
{ … }
static unsigned int bio_allowed_max_sectors(const struct queue_limits *lim)
{ … }
static struct bio *bio_submit_split(struct bio *bio, int split_sectors)
{ … }
struct bio *bio_split_discard(struct bio *bio, const struct queue_limits *lim,
unsigned *nsegs)
{ … }
struct bio *bio_split_write_zeroes(struct bio *bio,
const struct queue_limits *lim, unsigned *nsegs)
{ … }
static inline unsigned int blk_boundary_sectors(const struct queue_limits *lim,
bool is_atomic)
{ … }
static inline unsigned get_max_io_size(struct bio *bio,
const struct queue_limits *lim)
{ … }
static inline unsigned get_max_segment_size(const struct queue_limits *lim,
phys_addr_t paddr, unsigned int len)
{ … }
static bool bvec_split_segs(const struct queue_limits *lim,
const struct bio_vec *bv, unsigned *nsegs, unsigned *bytes,
unsigned max_segs, unsigned max_bytes)
{ … }
int bio_split_rw_at(struct bio *bio, const struct queue_limits *lim,
unsigned *segs, unsigned max_bytes)
{ … }
EXPORT_SYMBOL_GPL(…);
struct bio *bio_split_rw(struct bio *bio, const struct queue_limits *lim,
unsigned *nr_segs)
{ … }
struct bio *bio_split_zone_append(struct bio *bio,
const struct queue_limits *lim, unsigned *nr_segs)
{ … }
struct bio *bio_split_to_limits(struct bio *bio)
{ … }
EXPORT_SYMBOL(…);
unsigned int blk_recalc_rq_segments(struct request *rq)
{ … }
static inline struct scatterlist *blk_next_sg(struct scatterlist **sg,
struct scatterlist *sglist)
{ … }
static unsigned blk_bvec_map_sg(struct request_queue *q,
struct bio_vec *bvec, struct scatterlist *sglist,
struct scatterlist **sg)
{ … }
static inline int __blk_bvec_map_sg(struct bio_vec bv,
struct scatterlist *sglist, struct scatterlist **sg)
{ … }
static inline bool
__blk_segment_map_sg_merge(struct request_queue *q, struct bio_vec *bvec,
struct bio_vec *bvprv, struct scatterlist **sg)
{ … }
static int __blk_bios_map_sg(struct request_queue *q, struct bio *bio,
struct scatterlist *sglist,
struct scatterlist **sg)
{ … }
int __blk_rq_map_sg(struct request_queue *q, struct request *rq,
struct scatterlist *sglist, struct scatterlist **last_sg)
{ … }
EXPORT_SYMBOL(…);
static inline unsigned int blk_rq_get_max_sectors(struct request *rq,
sector_t offset)
{ … }
static inline int ll_new_hw_segment(struct request *req, struct bio *bio,
unsigned int nr_phys_segs)
{ … }
int ll_back_merge_fn(struct request *req, struct bio *bio, unsigned int nr_segs)
{ … }
static int ll_front_merge_fn(struct request *req, struct bio *bio,
unsigned int nr_segs)
{ … }
static bool req_attempt_discard_merge(struct request_queue *q, struct request *req,
struct request *next)
{ … }
static int ll_merge_requests_fn(struct request_queue *q, struct request *req,
struct request *next)
{ … }
static void blk_rq_set_mixed_merge(struct request *rq)
{ … }
static inline blk_opf_t bio_failfast(const struct bio *bio)
{ … }
static inline void blk_update_mixed_merge(struct request *req,
struct bio *bio, bool front_merge)
{ … }
static void blk_account_io_merge_request(struct request *req)
{ … }
static enum elv_merge blk_try_req_merge(struct request *req,
struct request *next)
{ … }
static bool blk_atomic_write_mergeable_rq_bio(struct request *rq,
struct bio *bio)
{ … }
static bool blk_atomic_write_mergeable_rqs(struct request *rq,
struct request *next)
{ … }
static struct request *attempt_merge(struct request_queue *q,
struct request *req, struct request *next)
{ … }
static struct request *attempt_back_merge(struct request_queue *q,
struct request *rq)
{ … }
static struct request *attempt_front_merge(struct request_queue *q,
struct request *rq)
{ … }
bool blk_attempt_req_merge(struct request_queue *q, struct request *rq,
struct request *next)
{ … }
bool blk_rq_merge_ok(struct request *rq, struct bio *bio)
{ … }
enum elv_merge blk_try_merge(struct request *rq, struct bio *bio)
{ … }
static void blk_account_io_merge_bio(struct request *req)
{ … }
enum bio_merge_status bio_attempt_back_merge(struct request *req,
struct bio *bio, unsigned int nr_segs)
{ … }
static enum bio_merge_status bio_attempt_front_merge(struct request *req,
struct bio *bio, unsigned int nr_segs)
{ … }
static enum bio_merge_status bio_attempt_discard_merge(struct request_queue *q,
struct request *req, struct bio *bio)
{ … }
static enum bio_merge_status blk_attempt_bio_merge(struct request_queue *q,
struct request *rq,
struct bio *bio,
unsigned int nr_segs,
bool sched_allow_merge)
{ … }
bool blk_attempt_plug_merge(struct request_queue *q, struct bio *bio,
unsigned int nr_segs)
{ … }
bool blk_bio_list_merge(struct request_queue *q, struct list_head *list,
struct bio *bio, unsigned int nr_segs)
{ … }
EXPORT_SYMBOL_GPL(…);
bool blk_mq_sched_try_merge(struct request_queue *q, struct bio *bio,
unsigned int nr_segs, struct request **merged_request)
{ … }
EXPORT_SYMBOL_GPL(…);