Function report |
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 activity | Download SCCT | Chinese |
Name:__badblocks_init
Proto:static int __badblocks_init(struct device *dev, struct badblocks *bb, int enable)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct device * | dev | |
| struct badblocks * | bb | |
| int | enable |
| 548 | count of bad blocks = 0 |
| 549 | If enable Then shift from sectors to block size * a -ve shift means badblocks are * disabled. = 0 |
| 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 |
| 559 | Return -ENOMEM |
| 561 | seqlock_init( & lock) |
| 563 | Return 0 |
| Name | Describe |
|---|---|
| badblocks_init | adblocks_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 |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |