函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Return the maximum number of sectors from the start of a bio that may be* submitted as a single request to a block device. If enough sectors remain,* align the end to the physical block size. Otherwise align the end to the* logical block size

函数原型:static inline unsigned get_max_io_size(struct request_queue *q, struct bio *bio)

返回类型:unsigned

参数:

类型参数名称
struct request_queue *q
struct bio *bio
146  sectors等于Return maximum size of a request at given offset. Only valid for* file system requests.
147  max_sectors等于sectors
148  pbs等于queue_physical_block_size(q)右移The basic unit of block I/O is a sector. It is used in a number of contexts* in Linux (blk, bio, genhd). The size of one sector is 512 = 2**9* bytes. Variables of type sector_t represent an offset or size that is a* multiple of 512 bytes
149  lbs等于queue_logical_block_size(q)右移The basic unit of block I/O is a sector. It is used in a number of contexts* in Linux (blk, bio, genhd). The size of one sector is 512 = 2**9* bytes. Variables of type sector_t represent an offset or size that is a* multiple of 512 bytes
150  start_offset等于 device address in 512 byte sectors 按位与pbs减1
152  max_sectors加等于start_offset
153  max_sectors与等于pbs减1的差的反
154  如果max_sectors大于start_offset则返回:max_sectorsstart_offset
157  返回:sectors按位与lbs减1
调用者
名称描述
blk_bio_segment_splitlk_bio_segment_split - split a bio in two bios*@q: [in] request queue pointer*@bio: [in] bio to be split*@bs: [in] bio set to allocate the clone from*@segs: [out] number of segments in the bio with the first half of the sectors* Clone @bio, update the