函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

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

返回类型:bool

参数:

类型参数名称
struct parsed_partitions *state
unsigned longbase
struct ldmdb *ldb
1356  u8 * data = NULL
1358  bool result = false
1359  LIST_HEAD(frags)
1361  BUG_ON(!state || !ldb)
1363  size等于vblk_size
1364  perbuf等于512除size
1365  skip等于vblk_offset右移9位
1366  finish等于sizelast_vblk_seq右移9位
1368 s小于finish循环
1369  data等于read_part_sector(state, base + List of partitions. + s, & sect)
1370  如果非data
1371  ldm_crit("Disk read failed.")
1372  转到:out
1375 v小于perbuf循环
1376  如果VBLK 不等于get_unaligned_be32(data)则
1377  ldm_error("Expected to find a VBLK.")
1378  转到:out
1381  recs等于get_unaligned_be16(data + 0x0E)
1382  如果recs恒等于1则
1385  否则如果recs大于1则
1391  put_dev_sector(sect)
1392  data = NULL
1395  result等于ldm_frag_commit - Validate fragmented VBLKs and add them to the database*@frags: Linked list of VBLK fragments*@ldb: Cache of the database structures* Now that all the fragmented VBLKs have been collected, they must be added to* the database for later use
1396  out :
1397  如果dataput_dev_sector(sect)
1399  ldm_frag_free - Free a linked list of VBLK fragments*@list: Linked list of fragments* Free a linked list of VBLK fragments* Return: none
1401  返回: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