函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static bool ldm_validate_vmdb(struct parsed_partitions *state, unsigned long base, struct ldmdb *ldb)

返回类型:bool

参数:

类型参数名称
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  如果非data
443  ldm_crit("Disk read failed.")
444  返回:false
447  如果非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则转到:out
451  如果get_unaligned_be16(data + 0x10)不等于0x01则
452  ldm_crit("Database is not in a consistent state. Aborting.")
453  转到:out
456  如果vblk_offset不等于512则ldm_info("VBLKs start at offset 0x%04x.", vblk_offset)
463  如果vblk_sizelast_vblk_seq大于bitmap1_size左移9位则
464  ldm_crit("VMDB exceeds allowed size specified by TOCBLOCK. Database is corrupt. Aborting.")
466  转到:out
469  result = true
470  out :
471  put_dev_sector(sect)
472  返回:result
调用者
名称描述
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