函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-core.c Create Date:2022-07-27 18:34:41
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:lk_queue_enter() - try to increase q->q_usage_counter*@q: request queue pointer*@flags: BLK_MQ_REQ_NOWAIT and/or BLK_MQ_REQ_PREEMPT

函数原型:int blk_queue_enter(struct request_queue *q, blk_mq_req_flags_t flags)

返回类型:int

参数:

类型参数名称
struct request_queue *q
blk_mq_req_flags_tflags
405  pm等于flags按位与BLK_MQ_REQ_PREEMPT
407  当(true)循环
408  bool success = false
410  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
417  如果pm或非blk_queue_pm_only(q)则
418  success = true
419  否则
423  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
425  如果success则返回:0
428  如果flags按位与BLK_MQ_REQ_NOWAIT则返回:负EBUSY
438  smp_rmb()
440  wait_event - sleep until a condition gets true*@wq_head: the waitqueue to wait on*@condition: a C expression for the event to wait for* The process is put to sleep (TASK_UNINTERRUPTIBLE) until the*@condition evaluates to true(mq_freeze_wq, (!mq_freeze_depth && (pm || (blk_pm_request_resume(q), !blk_queue_pm_only(q)))) || blk_queue_dying(q))
445  如果blk_queue_dying(q)则返回:负ENODEV
调用者
名称描述
generic_make_requestgeneric_make_request - hand a buffer to its device driver for I/O*@bio: The bio describing the location in memory and on the device.* generic_make_request() is used to make I/O requests of block* devices
direct_make_requestdirect_make_request - hand a buffer directly to its device driver for I/O*@bio: The bio describing the location in memory and on the device.* This function behaves like generic_make_request(), but does not protect* against recursion
blk_mq_alloc_request
blk_mq_alloc_request_hctx
bdev_write_pagedev_write_page() - Start writing a page to a block device*@bdev: The device to write the page to*@sector: The offset on the device to write the page to (need not be aligned)*@page: The page to write*@wbc: The writeback_control for the write