函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\badblocks.c Create Date:2022-07-27 19:00:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__badblocks_init

函数原型:static int __badblocks_init(struct device *dev, struct badblocks *bb, int enable)

返回类型:int

参数:

类型参数名称
struct device *dev
struct badblocks *bb
intenable
547  set by devm_init_badblocks 等于dev
548  count of bad blocks 等于0
549  如果enable shift from sectors to block size * a -ve shift means badblocks are * disabled.等于0
551  否则 shift from sectors to block size * a -ve shift means badblocks are * disabled.等于负1
553  如果dev badblock list 等于devm_kzalloc(dev, PAGE_SIZE, GFP_KERNEL)
555  否则 badblock list 等于分配内存并置零
557  如果非 badblock list
558  shift from sectors to block size * a -ve shift means badblocks are * disabled.等于负1
559  返回:负ENOMEM
561  seqlock_init( & lock)
563  返回:0
调用者
名称描述
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