函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:For non-mq, this has to be called with the request spinlock acquired.* For mq with scheduling, the appropriate queue wide lock should be held.

函数原型:static struct request *attempt_merge(struct request_queue *q, struct request *req, struct request *next)

返回类型:struct request

参数:

类型参数名称
struct request_queue *q
struct request *req
struct request *next
747  如果非rq_mergeable(req)或非rq_mergeable(next)则返回:NULL
750  如果req_op(req)不等于req_op(next)则返回:NULL
753  如果rq_data_dir(req)不等于rq_data_dir(next)或rq_disk不等于rq_disk则返回:NULL
757  如果req_op(req)恒等于REQ_OP_WRITE_SAME且非blk_write_same_mergeable(bio, bio)则返回:NULL
765  如果write_hint不等于write_hint则返回:NULL
768  如果ioprio不等于ioprio则返回:NULL
780  :blk_try_req_merge(req, next)恒等于ELEVATOR_DISCARD_MERGE
781  如果非req_attempt_discard_merge(q, req, next)则返回:NULL
783  退出
784  :blk_try_req_merge(req, next)恒等于ELEVATOR_BACK_MERGE
785  如果非ll_merge_requests_fn(q, req, next)则返回:NULL
787  退出
788  默认
789  返回:NULL
798  如果rq_flags按位或rq_flags的值按位与merge of different types, fail separately op and common flags 按位与REQ_FAILFAST_MASK的值不等于 op and common flags 按位与REQ_FAILFAST_MASK的值则
801  lk_rq_set_mixed_merge - mark a request as mixed merge*@rq: request to mark as mixed merge* Description:*@rq is about to be mixed merged. Make sure the attributes* which can be mixed are set in each bio and mark @rq as mixed* merged.
802  lk_rq_set_mixed_merge - mark a request as mixed merge*@rq: request to mark as mixed merge* Description:*@rq is about to be mixed merged. Make sure the attributes* which can be mixed are set in each bio and mark @rq as mixed* merged.
810  如果 Time that this request was allocated for this IO. 小于 Time that this request was allocated for this IO. Time that this request was allocated for this IO. 等于 Time that this request was allocated for this IO.
813  request queue link 等于bio
814  biotail等于biotail
816  total data len 加等于blk_rq_bytes(next)
818  如果非Two cases of handling DISCARD merge:* If max_discard_segments > 1, the driver takes every bio* as a range and send them to controller together. The ranges* needn't to be contiguous.* Otherwise, the bios/requests will be handled as same aselv_merge_requests(q, req, next)
824  blk_account_io_merge(next)
830  bio = NULL
831  返回:next
调用者
名称描述
attempt_back_merge
attempt_front_merge
blk_attempt_req_merge