函数逻辑报告 |
Source Code:block\blk-mq.c |
Create Date:2022-07-27 18:45:54 |
Last Modify:2020-03-17 23:18:05 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:blk_mq_make_request
函数原型:static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio)
返回类型:blk_qc_t
参数:
类型 | 参数 | 名称 |
---|---|---|
struct request_queue * | q | |
struct bio * | bio |
1910 | is_sync等于Reads are always treated as synchronous, as are requests with the FUA or* PREFLUSH flag. Other operations may be marked as synchronous using the* REQ_SYNC flag. |
1911 | is_flush_fua等于Check if the bio or request is one that needs special treatment in the* flush state machine. |
1912 | struct blk_mq_alloc_data data = {flags = 0} |
1915 | struct request * same_queue_rq = NULL |
1919 | blk_queue_bounce(q, & bio) |
1929 | 如果blk_mq_sched_bio_merge(q, bio, nr_segs)则返回:BLK_QC_T_NONE |
1932 | rq_qos_throttle(q, bio) |
1935 | rq等于blk_mq_get_request(q, bio, & data) |
1936 | 如果此条件成立可能性小(为编译器优化)(!rq)则 |
1937 | rq_qos_cleanup(q, bio) |
1938 | 如果 bottom bits req flags, * top bits REQ_OP. Use * accessors.按位与REQ_NOWAIT则bio_wouldblock_error(bio) |
1940 | 返回:BLK_QC_T_NONE |
1945 | rq_qos_track(q, rq, bio) |
1947 | cookie等于request_to_qc_t(hctx, rq) |
1949 | blk_mq_bio_to_request(rq, bio, nr_segs) |
1952 | 如果此条件成立可能性小(为编译器优化)(is_flush_fua)则 |
1955 | blk_mq_run_hw_queue(hctx, true) |
1956 | 否则如果plug且nr_hw_queues恒等于1或commit_rqs或非blk_queue_nonrot(q)的值则 |
1965 | request_count等于rq_count |
1970 | 否则last等于list_entry_rq(链表前项) |
1973 | 如果request_count大于等于BLK_MAX_REQUEST_COUNT或last且blk_rq_bytes(last)大于等于BLK_PLUG_FLUSH_SIZE则 |
1975 | 添加到请求队列 |
1979 | blk_add_rq_to_plug(plug, rq) |
1980 | 否则如果elevator则 |
1982 | 否则如果plug且非blk_queue_nomerges(q)则 |
1990 | 如果链表为空则same_queue_rq = NULL |
1992 | 如果same_queue_rq则 |
1993 | 删除链表项并重新初始化 |
1994 | rq_count自减 |
1996 | blk_add_rq_to_plug(plug, rq) |
1999 | 如果same_queue_rq则 |
2002 | blk_mq_try_issue_directly(hctx, same_queue_rq, & cookie) |
2007 | blk_mq_try_issue_directly(hctx, rq, & cookie) |
2008 | 否则 |
2012 | 返回:cookie |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |