Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-mq.c Create Date:2022-07-28 17:08:42
Last Modify:2020-03-17 23:18:05 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:blk_mq_alloc_request

Proto:struct request *blk_mq_alloc_request(struct request_queue *q, unsigned int op, blk_mq_req_flags_t flags)

Type:struct request

Parameter:

TypeParameterName
struct request_queue *q
unsigned intop
blk_mq_req_flags_tflags
403  struct blk_mq_alloc_data alloc_data = {flags = flags, cmd_flags = op}
407  ret = lk_queue_enter() - try to increase q->q_usage_counter*@q: request queue pointer*@flags: BLK_MQ_REQ_NOWAIT and/or BLK_MQ_REQ_PREEMPT
408  If ret Then Return ERR_PTR(ret)
411  rq = blk_mq_get_request(q, NULL, & alloc_data)
412  blk_queue_exit(q)
414  If Not rq Then Return ERR_PTR( - EWOULDBLOCK)
417  total data len = 0
418  sector cursor = (sector_t) - 1
419  bio = biotail = NULL
420  Return rq
Caller
NameDescribe
blk_get_requestlk_get_request - allocate a request*@q: request queue to allocate a request for*@op: operation (REQ_OP_*) and REQ_* flags, e.g. REQ_SYNC.*@flags: BLK_MQ_REQ_* flags, e.g. BLK_MQ_REQ_NOWAIT.