Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-mq-sched.c Create Date:2022-07-28 17:15:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Iterate list of requests and see if we can merge this bio with any* of them.

Proto:bool blk_mq_bio_list_merge(struct request_queue *q, struct list_head *list, struct bio *bio, unsigned int nr_segs)

Type:bool

Parameter:

TypeParameterName
struct request_queue *q
struct list_head *list
struct bio *bio
unsigned intnr_segs
266  checked = 8
269  bool merged = false
271  If Not checked -- Then Break
274  If Not blk_rq_merge_ok(rq, bio) Then Continue
278  Case blk_try_merge(rq, bio) == ELEVATOR_BACK_MERGE
279  If blk_mq_sched_allow_merge(q, rq, bio) Then merged = bio_attempt_back_merge(rq, bio, nr_segs)
282  Break
283  Case blk_try_merge(rq, bio) == ELEVATOR_FRONT_MERGE
284  If blk_mq_sched_allow_merge(q, rq, bio) Then merged = bio_attempt_front_merge(rq, bio, nr_segs)
287  Break
288  Case blk_try_merge(rq, bio) == ELEVATOR_DISCARD_MERGE
289  merged = bio_attempt_discard_merge(q, rq, bio)
290  Break
291  Default
292  Continue
295  Return merged
298  Return false
Caller
NameDescribe
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