函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__blk_queue_bounce

函数原型:static void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig, mempool_t *pool)

返回类型:void

参数:

类型参数名称
struct request_queue *q
struct bio **bio_orig
mempool_t *pool
290  rw等于Return the data direction, READ or WRITE.( * bio_orig)
293  i等于0
294  bool bounce = false
295  sectors等于0
296  passthrough等于bio_is_passthrough( * bio_orig)
298  bio_for_each_segment(from, * bio_orig, iter)
299  如果i自加小于BIO_MAX_PAGESsectors加等于bv_len右移9位
301  如果page_to_pfn(bv_page)大于bounce_pfnbounce = true
304  如果非bounce则返回
307  如果非passthroughsectors小于bio_sectors( * bio_orig)则
308  bio等于_split - split a bio*@bio: bio to split*@sectors: number of sectors to split from the front of @bio*@gfp: gfp mask*@bs: bio set to allocate from* Allocates and returns a new bio which represents @sectors from the start of
309  _chain - chain bio completions*@bio: the target bio*@parent: the @bio's parent bio* The caller won't have a bi_end_io called when @bio completes - instead,*@parent's bi_end_io won't be called until both @parent and @bio have
310  generic_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
311  bio_orig等于bio
313  bio等于bounce_clone_bio( * bio_orig, GFP_NOIO, passthrough ? NULL : & bounce_bio_set)
321 i小于 how many bio_vec's 循环
322  page等于bv_page
324  如果page_to_pfn(page)小于等于bounce_pfn则继续下一循环
327  bv_page等于mempool_alloc - allocate an element from a specific memory pool*@pool: pointer to the memory pool which was allocated via* mempool_create().*@gfp_mask: the usual allocation bitmask.* this function only sleeps if the alloc_fn() function sleeps or
328  We only use atomic operations to update counters. So there is no need to* disable interrupts.(bv_page, NR_BOUNCE)
330  如果rw恒等于WRITE
337  memcpy(vto, vfrom, bv_len)
342  lock_bio_bounce - used bounce buffer when processing block operation*@q: queue holding the block operation*@bio: block operation* A bounce buffer was used to handle the block operation @bio in @q
344  status, etc and bvec pool number 或等于1左移BIO_BOUNCED
346  如果pool恒等于page_pool
347  bi_end_io等于bounce_end_io_write
348  如果rw恒等于generic data direction definitions bi_end_io等于bounce_end_io_read
350  否则
351  bi_end_io等于bounce_end_io_write_isa
352  如果rw恒等于generic data direction definitions bi_end_io等于bounce_end_io_read_isa
356  bi_private等于bio_orig
357  bio_orig等于bio
调用者
名称描述
blk_queue_bounce