Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:static bool ldm_validate_vmdb(struct parsed_partitions *state, unsigned long base, struct ldmdb *ldb)

Type:bool

Parameter:

TypeParameterName
struct parsed_partitions *state
unsigned longbase
struct ldmdb *ldb
432  bool result = false
436  BUG_ON(!state || !ldb)
438  vm = vm
439  toc = toc
441  data = read_part_sector(state, base + List of partitions. , & sect)
442  If Not data Then
443  ldm_crit("Disk read failed.")
444  Return false
447  If Not 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 Then Go to out
451  If get_unaligned_be16(data + 0x10) != 0x01 Then
452  ldm_crit("Database is not in a consistent state. Aborting.")
453  Go to out
456  If vblk_offset != 512 Then ldm_info("VBLKs start at offset 0x%04x.", vblk_offset)
463  If vblk_size * last_vblk_seq > bitmap1_size << 9 Then
464  ldm_crit("VMDB exceeds allowed size specified by TOCBLOCK. Database is corrupt. Aborting.")
466  Go to out
469  result = true
470  out :
471  put_dev_sector(sect)
472  Return result
Caller
NameDescribe
ldm_partitionldm_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