Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:blk_mq_rq_ctx_init

Proto:static struct request *blk_mq_rq_ctx_init(struct blk_mq_alloc_data *data, unsigned int tag, unsigned int op, u64 alloc_time_ns)

Type:struct request

Parameter:

TypeParameterName
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  If flags & BLK_MQ_REQ_INTERNAL Then
280  tag = -1
281  internal_tag = tag
282  Else
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  If flags & BLK_MQ_REQ_PREEMPT Then rq_flags |= set for "ide_preempt" requests and also for requests for which the SCSI"quiesce" state must be ignored.
300  If blk_queue_io_stat( input parameter ) Then rq_flags |= account into disk and partition IO statistics
302  Initialization list head
303  INIT_HLIST_NODE( & merge hash )
304  RB_CLEAR_NODE( & sort/lookup )
305  rq_disk = NULL
306  part = NULL
310  If Only need start/end time stamping if we have iostat or* blk stats enabled, or using an IO scheduler. Then Time that this request was allocated for this IO. = ktime_get_ns()
312  Else 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  Return rq
Caller
NameDescribe
blk_mq_get_request