Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:blk_freeze_queue_start

Proto:void blk_freeze_queue_start(struct request_queue *q)

Type:void

Parameter:

TypeParameterName
struct request_queue *q
132  mutex_lock( & * Protect concurrent access to q_usage_counter by * percpu_ref_kill() and percpu_ref_reinit().)
133  If ++mq_freeze_depth == 1 Then
134  percpu_ref_kill - drop the initial ref*@ref: percpu_ref to kill* Must be used to drop the initial ref on a percpu refcount; must be called* precisely once before shutdown.* Switches @ref into atomic mode before gathering up the percpu counters
135  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
136  If queue_is_mq(q) Then blk_mq_run_hw_queues(q, false)
138  Else
139  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
Caller
NameDescribe
blk_freeze_queueGuarantee no request is in use, so we can change any data structure of* the queue afterward.
blk_pre_runtime_suspendlk_pre_runtime_suspend - Pre runtime suspend check*@q: the queue of the device* Description:* This function will check if runtime suspend is allowed for the device* by examining if there are any requests pending in the queue