函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ldm_partition - Find out whether a device is a dynamic disk and handle it*@state: Partition check state including device holding the LDM Database* This determines whether the device @bdev is a dynamic disk and if so creates

函数原型:int ldm_partition(struct parsed_partitions *state)

返回类型:int

参数:

类型参数名称
struct parsed_partitions *state
1444  result等于负1
1446  BUG_ON(!state)
1449  如果非ldm_validate_partition_table - Determine whether bdev might be a dynamic disk*@state: Partition check state including device holding the LDM Database* This function provides a weak test to decide whether the device is a dynamic* disk or not则返回:0
1452  ldb等于开辟内存
1453  如果非ldb
1454  ldm_crit("Out of memory.")
1455  转到:out
1459  如果非ldm_validate_privheads - Compare the primary privhead with its backups*@state: Partition check state including device holding the LDM Database*@ph1: Memory struct to fill with ph contents* Read and compare all three privheads from disk则转到:out
1463  base等于config_start
1466  如果非ldm_validate_tocblocks - Validate the table of contents and its backups*@state: Partition check state including device holding the LDM Database*@base: Offset, into @state->bdev, of the database*@ldb: Cache of the database structures* Find and compare the 或非ldm_validate_vmdb - Read the VMDB and validate it*@state: Partition check state including device holding the LDM Database*@base: Offset, into @bdev, of the database*@ldb: Cache of the database structures* Find the vmdb of the LDM Database stored on @bdev 则转到:out
1471  初始化链表头
1472  初始化链表头
1473  初始化链表头
1474  初始化链表头
1475  初始化链表头
1477  如果非ldm_get_vblks - Read the on-disk database of VBLKs into memory*@state: Partition check state including device holding the LDM Database*@base: Offset, into @state->bdev, of the database*@ldb: Cache of the database structures* To use the information from
1478  ldm_crit("Failed to read the VBLKs from the database.")
1479  转到:cleanup
1483  如果ldm_create_data_partitions - Create data partitions for this device*@pp: List of the partitions parsed so far*@ldb: Cache of the database structures* The database contains ALL the partitions for ALL disk groups, so we need to
1484  ldm_debug/info/error/crit - Output an error message*@f: A printf format string containing the message*@...: Variables to substitute into @f* ldm_debug() writes a DEBUG level message to the syslog but only if the* driver was compiled with debug enabled("Parsed LDM database successfully.")
1485  result等于1
1489  cleanup :
1490  ldm_free_vblks - Free a linked list of vblk's*@lh: Head of a linked list of struct vblk* Free a list of vblk's and free the memory used to maintain the list.* Return: none
1491  ldm_free_vblks - Free a linked list of vblk's*@lh: Head of a linked list of struct vblk* Free a list of vblk's and free the memory used to maintain the list.* Return: none
1492  ldm_free_vblks - Free a linked list of vblk's*@lh: Head of a linked list of struct vblk* Free a list of vblk's and free the memory used to maintain the list.* Return: none
1493  ldm_free_vblks - Free a linked list of vblk's*@lh: Head of a linked list of struct vblk* Free a list of vblk's and free the memory used to maintain the list.* Return: none
1494  ldm_free_vblks - Free a linked list of vblk's*@lh: Head of a linked list of struct vblk* Free a list of vblk's and free the memory used to maintain the list.* Return: none
1495  out :
1496  释放内存
1497  返回:result