Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bfq_bio_merge

Proto:static bool bfq_bio_merge(struct blk_mq_hw_ctx *hctx, struct bio *bio, unsigned int nr_segs)

Type:bool

Parameter:

TypeParameterName
struct blk_mq_hw_ctx *hctx
struct bio *bio
unsigned intnr_segs
2216  q = @queue: Pointer to the request queue that owns this hardware context.
2217  bfqd = elevator_data
2218  struct request * free = NULL
2226  bic = q_bic_lookup - search into @ioc a bic associated to @bfqd.*@bfqd: the lookup key.*@ioc: the io_context of the process doing I/O.*@q: the request queue.
2229  spin_lock_irq( & lock)
2231  If bic Then bfqq associated with the task issuing current bio for merging = bic_to_bfqq(bic, Reads are always treated as synchronous, as are requests with the FUA or* PREFLUSH flag. Other operations may be marked as synchronous using the* REQ_SYNC flag.)
2233  Else bfqq associated with the task issuing current bio for merging = NULL
2235  * bic associated with the task issuing current bio for * merging. This and the next field are used as a support to * be able to perform the bic lookup, needed by bio-merge * functions, before the scheduler lock is taken, and thus * avoid taking the request = bic
2237  ret = blk_mq_sched_try_merge(q, bio, nr_segs, & free)
2239  If free Then blk_mq_free_request(free)
2241  spin_unlock_irq( & lock)
2243  Return ret