Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:int blk_queue_enter(struct request_queue *q, blk_mq_req_flags_t flags)

Type:int

Parameter:

TypeParameterName
struct request_queue *q
blk_mq_req_flags_tflags
405  pm = flags & BLK_MQ_REQ_PREEMPT
407  When (true) cycle
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  If pm || Not blk_queue_pm_only(q) Then
418  success = true
419  Else
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  If success Then Return 0
428  If flags & BLK_MQ_REQ_NOWAIT Then Return -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  If blk_queue_dying(q) Then Return -ENODEV
Caller
NameDescribe
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