Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

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

Type:bool

Parameter:

TypeParameterName
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 = size * last_vblk_seq >> 9
1368  When s < finish cycle
1369  data = read_part_sector(state, base + List of partitions. + s, & sect)
1370  If Not data Then
1371  ldm_crit("Disk read failed.")
1372  Go to out
1375  When v < perbuf cycle
1376  If VBLK != get_unaligned_be32(data) Then
1377  ldm_error("Expected to find a VBLK.")
1378  Go to out
1381  recs = get_unaligned_be16(data + 0x0E)
1382  If recs == 1 Then
1385  Else if recs > 1 Then
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  If data Then put_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  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