Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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,

Proto:static void blk_flush_complete_seq(struct request *rq, struct blk_flush_queue *fq, unsigned int seq, blk_status_t error)

Type:void

Parameter:

TypeParameterName
struct request *rq
struct blk_flush_queue *fq
unsigned intseq
blk_status_terror
171  q = q
172  pending = flush_queue[flush_pending_idx]
175  BUG_ON(seq & seq)
176  seq |= seq
177  cmd_flags = op and common flags
179  If Value is more likely to compile time(!error) Then seq = blk_flush_cur_seq(rq)
181  Else seq = REQ_FSEQ_DONE
185  Case seq == REQ_FSEQ_PREFLUSH
186  Case seq == REQ_FSEQ_POSTFLUSH
188  If list_empty - tests whether a list is empty*@head: the list to test. Then flush_pending_since = jiffies
190  list_move_tail - delete from one list and add as another's tail*@list: the entry to move*@head: the head that will follow our entry
191  Break
193  Case seq == REQ_FSEQ_DATA
194  list_move_tail - delete from one list and add as another's tail*@list: the entry to move*@head: the head that will follow our entry
195  blk_flush_queue_rq(rq, true)
196  Break
198  Case seq == REQ_FSEQ_DONE
205  BUG_ON(!list_empty - tests whether a list is empty*@head: the list to test.)
206  list_del_init - deletes entry from list and reinitialize it.*@entry: the element to delete from the list.
207  blk_flush_restore_request(rq)
208  blk_mq_end_request(rq, error)
209  Break
211  Default
212  BUG()
215  blk_kick_flush(q, fq, cmd_flags)
Caller
NameDescribe
flush_end_io
mq_flush_data_end_io
blk_insert_flushlk_insert_flush - insert a new PREFLUSH/FUA request*@rq: request to insert* To be called from __elv_add_request() for %ELEVATOR_INSERT_FLUSH insertions.* or __blk_mq_run_hw_queue() to dispatch request.*@rq is being submitted