函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Mark us waiting for a tag. For shared tags, this involves hooking us into* the tag wakeups. For non-shared tags, we can simply mark us needing a* restart. For both cases, take care to check the condition again after* marking us as waiting.

函数原型:static bool blk_mq_mark_tag_wait(struct blk_mq_hw_ctx *hctx, struct request *rq)

返回类型:bool

参数:

类型参数名称
struct blk_mq_hw_ctx *hctx
struct request *rq
1081  sbq等于bitmap_tags
1086  如果非@flags: BLK_MQ_F_* flags. Defines the behaviour of the queue. 按位与BLK_MQ_F_TAG_SHARED的值则
1087  blk_mq_sched_mark_restart_hctx(hctx)
1097  返回:blk_mq_get_driver_tag(rq)
1100  wait等于@dispatch_wait: Waitqueue to put requests when there is no tag* available at the moment, to wait for another try in the future.
1101  如果非链表为空且不修改则返回:false
1104  wq等于wait
1106  spin_lock_irq( & lock)
1107  加自旋锁
1108  如果非链表为空
1109  自旋锁解锁
1110  spin_unlock_irq( & lock)
1111  返回:false
1114  atomic_inc( & @ws_active: count of currently active ws waitqueues)
1115  flags与等于wait_queue_entry::flags 的反
1116  __add_wait_queue(wq, wait)
1123  ret等于blk_mq_get_driver_tag(rq)
1124  如果非ret
1125  自旋锁解锁
1126  spin_unlock_irq( & lock)
1127  返回:false
1134  删除链表项并重新初始化
1135  atomic_dec( & @ws_active: count of currently active ws waitqueues)
1136  自旋锁解锁
1137  spin_unlock_irq( & lock)
1139  返回:true
调用者
名称描述
blk_mq_dispatch_rq_listReturns true if we did some work AND can potentially do more.