函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-mq.c Create Date:2022-07-27 18:43:42
Last Modify:2020-03-17 23:18:05 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:blk_freeze_queue_start

函数原型:void blk_freeze_queue_start(struct request_queue *q)

返回类型:void

参数:

类型参数名称
struct request_queue *q
132  mutex_lock( & * Protect concurrent access to q_usage_counter by * percpu_ref_kill() and percpu_ref_reinit().)
133  如果mq_freeze_depth先自加恒等于1则
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  如果queue_is_mq(q)则blk_mq_run_hw_queues(q, false)
138  否则
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.
调用者
名称描述
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