Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ldm_parse_vmdb - Read the LDM Database VMDB structure*@data: Raw database VMDB structure loaded from the device*@vm: In-memory vmdb structure in which to return parsed information* This parses the LDM Database VMDB structure supplied in @data and sets up

Proto:static bool ldm_parse_vmdb(const u8 *data, struct vmdb *vm)

Type:bool

Parameter:

TypeParameterName
const u8 *data
struct vmdb *vm
174  BUG_ON(!data || !vm)
176  If VMDB != get_unaligned_be32(data) Then
177  ldm_crit("Cannot find the VMDB, database may be corrupt.")
178  Return false
181  VMDB: The database header = get_unaligned_be16(data + 0x12)
182  ver_minor = get_unaligned_be16(data + 0x14)
183  If VMDB: The database header != 4 || ver_minor != 10 Then
184  ldm_error("Expected VMDB version %d.%d, got %d.%d. Aborting.", 4, 10, VMDB: The database header , ver_minor)
186  Return false
189  vblk_size = get_unaligned_be32(data + 0x08)
190  If vblk_size == 0 Then
191  ldm_error("Illegal VBLK size")
192  Return false
195  vblk_offset = get_unaligned_be32(data + 0x0C)
196  last_vblk_seq = get_unaligned_be32(data + 0x04)
198  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 VMDB successfully.")
199  Return true
Caller
NameDescribe
ldm_validate_vmdbldm_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