函数逻辑报告

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_discard_alignment

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

返回类型:int

参数:

类型参数名称
struct queue_limits *lim
sector_tsector
1381  如果非max_discard_sectors则返回:0
1385  alignment等于discard_alignment右移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
1386  granularity等于discard_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
1387  如果非granularity则返回:0
1391  offset等于sector_div(sector, granularity)
1394  offset等于granularityalignmentoffset的差取模granularity
1397  返回:offset左移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
调用者
名称描述
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.