函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-mq-sched.c Create Date:2022-07-27 18:50:28
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Iterate list of requests and see if we can merge this bio with any* of them.

函数原型:bool blk_mq_bio_list_merge(struct request_queue *q, struct list_head *list, struct bio *bio, unsigned int nr_segs)

返回类型:bool

参数:

类型参数名称
struct request_queue *q
struct list_head *list
struct bio *bio
unsigned intnr_segs
266  checked等于8
269  bool merged = false
271  如果非checked自减则退出
274  如果非blk_rq_merge_ok(rq, bio)则继续下一循环
278  :blk_try_merge(rq, bio)恒等于ELEVATOR_BACK_MERGE
279  如果blk_mq_sched_allow_merge(q, rq, bio)则merged等于bio_attempt_back_merge(rq, bio, nr_segs)
282  退出
283  :blk_try_merge(rq, bio)恒等于ELEVATOR_FRONT_MERGE
284  如果blk_mq_sched_allow_merge(q, rq, bio)则merged等于bio_attempt_front_merge(rq, bio, nr_segs)
287  退出
288  :blk_try_merge(rq, bio)恒等于ELEVATOR_DISCARD_MERGE
289  merged等于bio_attempt_discard_merge(q, rq, bio)
290  退出
291  默认
292  继续下一循环
295  返回:merged
298  返回:false
调用者
名称描述
blk_mq_attempt_mergeReverse check our software queue for entries that we could potentially* merge with. Currently includes a hand-wavy stop count of 8, to not spend* too much time checking for merges.
kyber_bio_merge