函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:static bool ldm_parse_vmdb(const u8 *data, struct vmdb *vm)

返回类型:bool

参数:

类型参数名称
const u8 *data
struct vmdb *vm
174  BUG_ON(!data || !vm)
176  如果VMDB 不等于get_unaligned_be32(data)则
177  ldm_crit("Cannot find the VMDB, database may be corrupt.")
178  返回:false
181  VMDB: The database header 等于get_unaligned_be16(data + 0x12)
182  ver_minor等于get_unaligned_be16(data + 0x14)
183  如果 VMDB: The database header 不等于4或ver_minor不等于10则
184  ldm_error("Expected VMDB version %d.%d, got %d.%d. Aborting.", 4, 10, VMDB: The database header , ver_minor)
186  返回:false
189  vblk_size等于get_unaligned_be32(data + 0x08)
190  如果vblk_size恒等于0则
191  ldm_error("Illegal VBLK size")
192  返回: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  返回:true
调用者
名称描述
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