Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\blkdev.h Create Date:2022-07-28 05:46:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:queue_limit_discard_alignment

Proto:static inline int queue_limit_discard_alignment(struct queue_limits *lim, sector_t sector)

Type:int

Parameter:

TypeParameterName
struct queue_limits *lim
sector_tsector
1381  If Not max_discard_sectors Then Return 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  If Not granularity Then Return 0
1391  offset = sector_div(sector, granularity)
1394  offset = ( granularity + alignment - offset) % granularity
1397  Return 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
Caller
NameDescribe
blk_stack_limitsadjust queue_limits for stacked devices
add_partitionMust be called either with bd_mutex held, before a disk can be opened or* after all disk users are gone.