函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ldm_parse_vblk - Read a raw VBLK object into a vblk structure*@buf: Block of data being worked on*@len: Size of the block of data*@vb: In-memory vblk in which to return information* Read a raw VBLK object into a vblk structure

函数原型:static bool ldm_parse_vblk(const u8 *buf, int len, struct vblk *vb)

返回类型:bool

参数:

类型参数名称
const u8 *buf
intlen
struct vblk *vb
1115  bool result = false
1118  BUG_ON(!buf || !vb)
1120  r_objid等于ldm_relative - Calculate the next relative offset*@buffer: Block of data being worked on*@buflen: Size of the block of data*@base: Size of the previous fixed width fields*@offset: Cumulative size of the previous variable-width fields* Because many of the
1121  如果r_objid小于0则
1122  ldm_error("VBLK header is corrupt.")
1123  返回:false
1126  flags等于buf[0x12]
1127  type等于buf[0x13]
1128  obj_id等于ldm_get_vnum - Convert a variable-width, big endian number, into cpu order*@block: Pointer to the variable-width number to convert* Large numbers in the LDM Database are often stored in a packed format. Each* number is prefixed by a one byte width marker
1129  ldm_get_vstr - Read a length-prefixed string into a buffer*@block: Pointer to the length marker*@buffer: Location to copy string to*@buflen: Size of the output buffer* Many of the strings in the LDM Database are not NULL terminated. Instead
1132  :type恒等于Component, version 3
1132  result等于ldm_parse_cmp3 - Read a raw VBLK Component object into a vblk structure*@buffer: Block of data being worked on*@buflen: Size of the block of data*@vb: In-memory vblk in which to return information
1132  退出
1133  :type恒等于Disk, version 3
1133  result等于ldm_parse_dsk3 - Read a raw VBLK Disk object into a vblk structure*@buffer: Block of data being worked on*@buflen: Size of the block of data*@vb: In-memory vblk in which to return information* Read a raw VBLK Disk object (version 3) into a vblk structure
1133  退出
1134  :type恒等于Disk, version 4
1134  result等于ldm_parse_dsk4 - Read a raw VBLK Disk object into a vblk structure*@buffer: Block of data being worked on*@buflen: Size of the block of data*@vb: In-memory vblk in which to return information* Read a raw VBLK Disk object (version 4) into a vblk structure
1134  退出
1135  :type恒等于Disk Group, version 3
1135  result等于ldm_parse_dgr3 - Read a raw VBLK Disk Group object into a vblk structure*@buffer: Block of data being worked on*@buflen: Size of the block of data*@vb: In-memory vblk in which to return information
1135  退出
1136  :type恒等于Disk Group, version 4
1136  result等于ldm_parse_dgr4 - Read a raw VBLK Disk Group object into a vblk structure*@buffer: Block of data being worked on*@buflen: Size of the block of data*@vb: In-memory vblk in which to return information
1136  退出
1137  :type恒等于Partition, version 3
1137  result等于ldm_parse_prt3 - Read a raw VBLK Partition object into a vblk structure*@buffer: Block of data being worked on*@buflen: Size of the block of data*@vb: In-memory vblk in which to return information
1137  退出
1138  :type恒等于Volume, version 5
1138  result等于ldm_parse_vol5 - Read a raw VBLK Volume object into a vblk structure*@buffer: Block of data being worked on*@buflen: Size of the block of data*@vb: In-memory vblk in which to return information
1138  退出
1141  如果resultldm_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 VBLK 0x%llx (type: 0x%02x) ok.", (unsignedlonglong)obj_id, type)
1144  否则ldm_error("Failed to parse VBLK 0x%llx (type: 0x%02x).", (unsignedlonglong)obj_id, type)
1148  返回:result
调用者
名称描述
ldm_ldmdb_addldm_ldmdb_add - Adds a raw VBLK entry to the ldmdb database*@data: Raw VBLK to add to the database*@len: Size of the raw VBLK*@ldb: Cache of the database structures* The VBLKs are sorted into categories. Partitions are also sorted by offset.* N