Function report |
Source Code:block\partitions\ldm.c |
Create Date:2022-07-28 17:28:38 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:ldm_frag_add - Add a VBLK fragment to a list*@data: Raw fragment to be added to the list*@size: Size of the raw fragment*@frags: Linked list of VBLK fragments* Fragmented VBLKs may not be consecutive in the database, so they are placed
Proto:static bool ldm_frag_add(const u8 *data, int size, struct list_head *frags)
Type:bool
Parameter:
Type | Parameter | Name |
---|---|---|
const u8 * | data | |
int | size | |
struct list_head * | frags |
1235 | If size < 2 * size of a vblk's static parts Then |
1236 | ldm_error("Value of size is to small.") |
1237 | Return false |
1240 | group = get_unaligned_be32(data + 0x08) |
1241 | rec = get_unaligned_be16(data + 0x0C) |
1242 | num = get_unaligned_be16(data + 0x0E) |
1249 | Return false |
1258 | f = Allocation memory |
1259 | If Not f Then |
1260 | ldm_crit("Out of memory.") |
1261 | Return false |
1265 | Total number of records = num |
1266 | This is record number n = rec |
1267 | Which portions are in use = 0xFF << num |
1270 | found : |
1271 | If rec >= Total number of records Then |
1272 | ldm_error("REC value (%d) exceeds NUM value (%d)", rec, Total number of records ) |
1273 | Return false |
1275 | If Which portions are in use & 1 << rec Then |
1277 | Which portions are in use &= 0x7F |
1278 | Return false |
1280 | Which portions are in use |= 1 << rec |
1281 | If Not rec Then memcpy(data, data, size of a vblk's static parts ) |
1283 | data += size of a vblk's static parts |
1284 | size -= size of a vblk's static parts |
1286 | Return true |
Name | Describe |
---|---|
ldm_get_vblks | 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 |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |