函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:blk_try_req_merge

函数原型:static enum elv_merge blk_try_req_merge(struct request *req, struct request *next)

返回类型:enum elv_merge

参数:

类型参数名称
struct request *req
struct request *next
732  如果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 as则返回:ELEVATOR_DISCARD_MERGE
734  否则如果lk_rq_pos() : the current sector* blk_rq_bytes() : bytes left in the entire request* blk_rq_cur_bytes() : bytes left in the current segment* blk_rq_err_bytes() : bytes left till the next error boundary* blk_rq_sectors() : sectors left in the entire blk_rq_sectors(req)恒等于lk_rq_pos() : the current sector* blk_rq_bytes() : bytes left in the entire request* blk_rq_cur_bytes() : bytes left in the current segment* blk_rq_err_bytes() : bytes left till the next error boundary* blk_rq_sectors() : sectors left in the entire 则返回:ELEVATOR_BACK_MERGE
737  返回:ELEVATOR_NO_MERGE
调用者
名称描述
attempt_mergeFor non-mq, this has to be called with the request spinlock acquired.* For mq with scheduling, the appropriate queue wide lock should be held.