Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-core.c Create Date:2022-07-28 16:59:48
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:lk_attempt_plug_merge - try to merge with %current's plugged list*@q: request_queue new bio is being queued at*@bio: new bio being queued*@nr_segs: number of segments in @bio*@same_queue_rq: pointer to &struct request that gets filled in when* another

Proto:bool blk_attempt_plug_merge(struct request_queue *q, struct bio *bio, unsigned int nr_segs, struct request **same_queue_rq)

Type:bool

Parameter:

TypeParameterName
struct request_queue *q
struct bio *bio
unsigned intnr_segs
struct request **same_queue_rq
702  plug = lk_mq_plug() - Get caller context plug*@q: request queue*@bio : the bio being submitted by the caller context* Plugging, by design, may delay the insertion of BIOs into the elevator in* order to increase BIO merging opportunities
703  If Not plug Then Return false
706  plug_list = lk-mq requests
709  bool merged = false
711  If q == q && same_queue_rq Then
717  same_queue_rq = rq
720  If q != q || Not blk_rq_merge_ok(rq, bio) Then Continue
724  Case blk_try_merge(rq, bio) == ELEVATOR_BACK_MERGE
725  merged = bio_attempt_back_merge(rq, bio, nr_segs)
726  Break
727  Case blk_try_merge(rq, bio) == ELEVATOR_FRONT_MERGE
728  merged = bio_attempt_front_merge(rq, bio, nr_segs)
729  Break
730  Case blk_try_merge(rq, bio) == ELEVATOR_DISCARD_MERGE
731  merged = bio_attempt_discard_merge(q, rq, bio)
732  Break
733  Default
734  Break
737  If merged Then Return true
741  Return false
Caller
NameDescribe
blk_mq_make_request