函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\blkdev.h Create Date:2022-07-27 06:47:13
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:queue_limit_alignment_offset

函数原型:static inline int queue_limit_alignment_offset(struct queue_limits *lim, sector_t sector)

返回类型:int

参数:

类型参数名称
struct queue_limits *lim
sector_tsector
1349  granularity等于两数取大(physical_block_size, io_min)
1350  alignment等于sector_div(sector, granularity >> 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)左移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
1353  返回:granularityalignment_offsetalignment的差取模granularity
调用者
名称描述
blk_stack_limitslk_stack_limits - adjust queue_limits for stacked devices*@t: the stacking driver limits (top device)*@b: the underlying queue limits (bottom, component device)*@start: first data sector within component device* Description:* This function is used by
add_partitionMust be called either with bd_mutex held, before a disk can be opened or* after all disk users are gone.