Function report |
Source Code:block\blk-mq.c |
Create Date:2022-07-28 17:10:33 |
| Last Modify:2020-03-17 23:18:05 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:blk_mq_make_request
Proto:static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio)
Type:blk_qc_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| 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 | If blk_mq_sched_bio_merge(q, bio, nr_segs) Then Return BLK_QC_T_NONE |
| 1932 | rq_qos_throttle(q, bio) |
| 1935 | rq = blk_mq_get_request(q, bio, & data) |
| 1936 | If Value for the false possibility is greater at compile time(!rq) Then |
| 1937 | rq_qos_cleanup(q, bio) |
| 1938 | If bottom bits req flags, * top bits REQ_OP. Use * accessors. & REQ_NOWAIT Then bio_wouldblock_error(bio) |
| 1940 | Return 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) |
| 1955 | blk_mq_run_hw_queue(hctx, true) |
| 1956 | Else if plug && ( nr_hw_queues == 1 || commit_rqs || Not blk_queue_nonrot(q) ) Then |
| 1965 | request_count = rq_count |
| 1970 | Else last = list_entry_rq(prev) |
| 1973 | If request_count >= BLK_MAX_REQUEST_COUNT || last && blk_rq_bytes(last) >= BLK_PLUG_FLUSH_SIZE Then |
| 1975 | blk_flush_plug_list(plug, false) |
| 1979 | blk_add_rq_to_plug(plug, rq) |
| 1980 | Else if elevator Then |
| 1982 | Else if plug && Not blk_queue_nomerges(q) Then |
| 1990 | If list_empty - tests whether a list is empty*@head: the list to test. Then same_queue_rq = NULL |
| 1992 | If same_queue_rq Then |
| 1994 | rq_count-- |
| 1996 | blk_add_rq_to_plug(plug, rq) |
| 1999 | If same_queue_rq Then |
| 2002 | blk_mq_try_issue_directly(hctx, same_queue_rq, & cookie) |
| 2007 | blk_mq_try_issue_directly(hctx, rq, & cookie) |
| 2008 | Else |
| 2012 | Return cookie |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |