函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:bool blk_attempt_plug_merge(struct request_queue *q, struct bio *bio, unsigned int nr_segs, struct request **same_queue_rq)

返回类型:bool

参数:

类型参数名称
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  如果非plug则返回:false
706  plug_list等于lk-mq requests
709  bool merged = false
711  如果q恒等于qsame_queue_rq
717  same_queue_rq等于rq
720  如果q不等于q或非blk_rq_merge_ok(rq, bio)则继续下一循环
724  :blk_try_merge(rq, bio)恒等于ELEVATOR_BACK_MERGE
725  merged等于bio_attempt_back_merge(rq, bio, nr_segs)
726  退出
727  :blk_try_merge(rq, bio)恒等于ELEVATOR_FRONT_MERGE
728  merged等于bio_attempt_front_merge(rq, bio, nr_segs)
729  退出
730  :blk_try_merge(rq, bio)恒等于ELEVATOR_DISCARD_MERGE
731  merged等于bio_attempt_discard_merge(q, rq, bio)
732  退出
733  默认
734  退出
737  如果merged则返回:true
741  返回:false
调用者
名称描述
blk_mq_make_request