Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-flush.c Create Date:2022-07-28 17:02:52
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:blk_kick_flush

Proto:static void blk_kick_flush(struct request_queue *q, struct blk_flush_queue *fq, unsigned int flags)

Type:void

Parameter:

TypeParameterName
struct request_queue *q
struct blk_flush_queue *fq
unsigned intflags
284  pending = flush_queue[flush_pending_idx]
285  first_rq = list_first_entry - get the first element from a list*@ptr: the list head to take the element from.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.* Note, that list is expected to be not empty.(pending, structrequest, list)
287  flush_rq = flush_rq
290  If flush_pending_idx != flush_running_idx || list_empty - tests whether a list is empty*@head: the list to test. Then Return
299  If Not list_empty - tests whether a list is empty*@head: the list to test. && elevator && time_before(jiffies, flush_pending_since + FLUSH_PENDING_TIMEOUT) Then Return
308  flush_pending_idx ^= 1
310  blk_rq_init(q, flush_rq)
320  mq_ctx = mq_ctx
321  mq_hctx = mq_hctx
323  If Not elevator Then
324  * flush_rq shares tag with this rq, both can't be active * at the same time = first_rq
325  tag = tag
326  This helper should only be used for flush request to share tag* with the request cloned from, and both the two requests can't be* in flight at the same time. The caller has to make sure the tag* can't be freed.
327  Else
328  internal_tag = internal_tag
331  op and common flags = REQ_OP_FLUSH | REQ_PREFLUSH
332  op and common flags |= flags & REQ_DRV | flags & REQ_FAILFAST_MASK
333  rq_flags |= quest for flush sequence
334  rq_disk = rq_disk
335  * completion callback. = flush_end_io
337  blk_flush_queue_rq(flush_rq, false)
Caller
NameDescribe
blk_flush_complete_seqlk_flush_complete_seq - complete flush sequence*@rq: PREFLUSH/FUA request being sequenced*@fq: flush queue*@seq: sequences to complete (mask of %REQ_FSEQ_*, can be zero)*@error: whether an error occurred*@rq just completed @seq part of its flush sequence,