Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:flush_end_io

Proto:static void flush_end_io(struct request *flush_rq, blk_status_t error)

Type:void

Parameter:

TypeParameterName
struct request *flush_rq
blk_status_terror
220  q = q
223  flags = 0
224  fq = blk_get_flush_queue(q, mq_ctx)
227  blk_account_io_flush(flush_rq)
230  spin_lock_irqsave( & mq_flush_lock, flags)
232  If Not _dec_and_test - decrement a refcount and test if it is 0*@r: the refcount* Similar to atomic_dec_and_test(), it will WARN on underflow and fail to* decrement when saturated at REFCOUNT_SATURATED Then
233  rq_status = error
234  spin_unlock_irqrestore( & mq_flush_lock, flags)
235  Return
238  If rq_status != BLK_STS_OK Then error = rq_status
241  hctx = mq_hctx
242  If Not elevator Then
243  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.
244  tag = -1
245  Else
246  blk_mq_put_driver_tag(flush_rq)
247  internal_tag = -1
250  running = flush_queue[flush_running_idx]
251  BUG_ON(flush_pending_idx == flush_running_idx)
254  flush_running_idx ^= 1
258  seq = blk_flush_cur_seq(rq)
260  BUG_ON(seq != REQ_FSEQ_PREFLUSH && seq != REQ_FSEQ_POSTFLUSH)
261  lk_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,
264  flush_queue_delayed = 0
265  spin_unlock_irqrestore( & mq_flush_lock, flags)