Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__badblocks_init

Proto:static int __badblocks_init(struct device *dev, struct badblocks *bb, int enable)

Type:int

Parameter:

TypeParameterName
struct device *dev
struct badblocks *bb
intenable
547  set by devm_init_badblocks = dev
548  count of bad blocks = 0
549  If enable Then shift from sectors to block size * a -ve shift means badblocks are * disabled. = 0
551  Else shift from sectors to block size * a -ve shift means badblocks are * disabled. = -1
553  If dev Then badblock list = devm_kzalloc(dev, PAGE_SIZE, GFP_KERNEL)
555  Else badblock list = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
557  If Not badblock list Then
558  shift from sectors to block size * a -ve shift means badblocks are * disabled. = -1
559  Return -ENOMEM
561  seqlock_init( & lock)
563  Return 0
Caller
NameDescribe
badblocks_initadblocks_init() - initialize the badblocks structure*@bb: the badblocks structure that holds all badblock information*@enable: weather to enable badblocks accounting* Return:* 0: success* -ve errno: on error
devm_init_badblocks