函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-mq.c Create Date:2022-07-27 18:43:59
Last Modify:2020-03-17 23:18:05 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:blk_mq_get_request

函数原型:static struct request *blk_mq_get_request(struct request_queue *q, struct bio *bio, struct blk_mq_alloc_data *data)

返回类型:struct request

参数:

类型参数名称
struct request_queue *q
struct bio *bio
struct blk_mq_alloc_data *data
338  e等于elevator
341  bool clear_ctx_on_error = false
342  alloc_time_ns等于0
344  blk_queue_enter_live(q)
347  如果blk_queue_rq_alloc_time(q)则alloc_time_ns等于ktime_get_ns()
350  input parameter 等于q
351  如果此条件成立可能性大(为编译器优化)(! input & output parameter )则
352  input & output parameter 等于This assumes per-cpu software queueing queues. They could be per-node* as well, for instance. For now this is hardcoded as-is. Note that we don't* care about preemption, since we know the ctx's are persistent. This does
353  clear_ctx_on_error = true
355  如果此条件成立可能性大(为编译器优化)(!hctx)则hctx等于lk_mq_map_queue() - map (cmd_flags,type) to hardware queue*@q: request queue*@flags: request command flags*@cpu: cpu ctx
358  如果cmd_flags按位与REQ_NOWAITflags或等于BLK_MQ_REQ_NOWAIT
361  如果e
362  flags或等于BLK_MQ_REQ_INTERNAL
369  如果非Check if the bio or request is one that needs special treatment in the* flush state machine.limit_depth且非flags按位与BLK_MQ_REQ_RESERVED的值则limit_depth(cmd_flags, data)
373  否则
374  blk_mq_tag_busy(hctx)
377  tag等于blk_mq_get_tag(data)
378  如果tag恒等于BLK_MQ_TAG_FAIL
379  如果clear_ctx_on_error input & output parameter = NULL
381  blk_queue_exit(q)
382  返回:NULL
385  rq等于blk_mq_rq_ctx_init(data, tag, cmd_flags, alloc_time_ns)
386  如果非Check if the bio or request is one that needs special treatment in the* flush state machine.
387  icq = NULL
388  如果eprepare_request
396  @queued: Number of queued requests. 自加
397  返回:rq
调用者
名称描述
blk_mq_alloc_request
blk_mq_alloc_request_hctx
blk_mq_make_request