Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:static inline unsigned get_max_io_size(struct request_queue *q, struct bio *bio)

Type:unsigned

Parameter:

TypeParameterName
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  If max_sectors > start_offset Then Return max_sectors - start_offset
157  Return sectors & lbs - 1
Caller
NameDescribe
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