函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__blk_mq_sched_bio_merge

函数原型:bool __blk_mq_sched_bio_merge(struct request_queue *q, struct bio *bio, unsigned int nr_segs)

返回类型:bool

参数:

类型参数名称
struct request_queue *q
struct bio *bio
unsigned intnr_segs
327  e等于elevator
328  ctx等于This assumes per-cpu software queueing queues. They could be per-node* as well, for instance. For now this is hardcoded as-is. Note that we don't* care about preemption, since we know the ctx's are persistent. This does
329  hctx等于lk_mq_map_queue() - map (cmd_flags,type) to hardware queue*@q: request queue*@flags: request command flags*@cpu: cpu ctx
330  bool ret = false
333  如果ebio_merge则返回:bio_merge(hctx, bio, nr_segs)
336  type等于@type: HCTX_TYPE_* flags. Type of hardware queue.
337  如果@flags: BLK_MQ_F_* flags. Defines the behaviour of the queue. 按位与BLK_MQ_F_SHOULD_MERGE且非链表为空且不修改
340  加自旋锁
341  ret等于Reverse check our software queue for entries that we could potentially* merge with. Currently includes a hand-wavy stop count of 8, to not spend* too much time checking for merges.
342  自旋锁解锁
345  返回:ret
调用者
名称描述
blk_mq_sched_bio_merge