函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:blk_mq_rq_ctx_init

函数原型:static struct request *blk_mq_rq_ctx_init(struct blk_mq_alloc_data *data, unsigned int tag, unsigned int op, u64 alloc_time_ns)

返回类型:struct request

参数:

类型参数名称
struct blk_mq_alloc_data *data
unsigned inttag
unsigned intop
u64alloc_time_ns
275  tags等于blk_mq_tags_from_data(data)
276  rq等于static_rqs[tag]
277  rq_flags等于0
279  如果flags按位与BLK_MQ_REQ_INTERNAL
280  tag等于负1
281  internal_tag等于tag
282  否则
287  tag等于tag
288  internal_tag等于负1
289  rqs[tag]等于rq
293  q等于 input parameter
294  mq_ctx等于 input & output parameter
295  mq_hctx等于hctx
296  rq_flags等于rq_flags
297  op and common flags 等于op
298  如果flags按位与BLK_MQ_REQ_PREEMPTrq_flags或等于set for "ide_preempt" requests and also for requests for which the SCSI"quiesce" state must be ignored.
300  如果blk_queue_io_stat( input parameter )则rq_flags或等于account into disk and partition IO statistics
302  初始化链表头
303  INIT_HLIST_NODE( & merge hash )
304  RB_CLEAR_NODE( & sort/lookup )
305  rq_disk = NULL
306  part = NULL
310  如果Only need start/end time stamping if we have iostat or* blk stats enabled, or using an IO scheduler. Time that this request was allocated for this IO. 等于ktime_get_ns()
312  否则 Time that this request was allocated for this IO. 等于0
314  Time that I/O was submitted to the device. 等于0
315  * rq sectors used for blk stats. It has the same value * with blk_rq_sectors(rq), except that it never be zeroed * by completion.等于0
316  * Number of scatter-gather DMA addr+len pairs after * physical address coalescing is performed.等于0
318  nr_integrity_segments等于0
321  length of alignment and padding 等于0
322  WRITE_ONCE(deadline, 0)
324  timeout等于0
326  * completion callback. = NULL
327  end_io_data = NULL
329  cremented at dispatch time [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.]自加
330  _set - set a refcount's value*@r: the refcount*@n: value to which the refcount will be set
331  返回:rq
调用者
名称描述
blk_mq_get_request