Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:int ldm_partition(struct parsed_partitions *state)

Type:int

Parameter:

TypeParameterName
struct parsed_partitions *state
1444  result = -1
1446  BUG_ON(!state)
1449  If Not 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 Then Return 0
1452  ldb = Allocation memory
1453  If Not ldb Then
1454  ldm_crit("Out of memory.")
1455  Go to out
1459  If Not 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 Then Go to out
1463  base = config_start
1466  If Not 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 || Not 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 Then Go to out
1471  Initialization list head
1472  Initialization list head
1473  Initialization list head
1474  Initialization list head
1475  Initialization list head
1477  If Not 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 Then
1478  ldm_crit("Failed to read the VBLKs from the database.")
1479  Go to cleanup
1483  If 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 Then
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  kfree(ldb)
1497  Return result