函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ad_lba(): Read bytes from disk, starting at given LBA*@state: disk parsed partitions*@lba: the Logical Block Address of the partition table*@buffer: destination buffer*@count: bytes to read* Description: Reads @count bytes from @state->bdev into @buffer.

函数原型:static size_t read_lba(struct parsed_partitions *state, u64 lba, u8 *buffer, size_t count)

返回类型:size_t

参数:

类型参数名称
struct parsed_partitions *state
u64lba
u8 *buffer
size_tcount
240  totalreadcount等于0
241  bdev等于bdev
242  n等于lbabdev_logical_block_size(bdev)除512
244  如果非bufferlba大于last_lba(): return number of last logical block of device*@bdev: block device* Description: Returns last LBA value on success, 0 on error.* This is stored (by sd and ide-geometry) in* the part[0] entry for this disk, and is the number of则返回:0
247 count循环
248  copied等于512
250  data等于read_part_sector(state, n++, & sect)
251  如果非data退出
253  如果copied大于countcopied等于count
255  memcpy(buffer, data, copied)
256  put_dev_sector(sect)
257  buffer加等于copied
258  totalreadcount加等于copied
259  count减等于copied
261  返回:totalreadcount
调用者
名称描述
alloc_read_gpt_entriesalloc_read_gpt_entries(): reads partition entries from disk*@state: disk parsed partitions*@gpt: GPT header* Description: Returns ptes on success, NULL on error
alloc_read_gpt_headeralloc_read_gpt_header(): Allocates GPT header, reads into it from disk*@state: disk parsed partitions*@lba: the Logical Block Address of the partition table* Description: returns GPT header on success, NULL on error. Allocates
find_valid_gptd_valid_gpt() - Search disk for valid GPT headers and PTEs*@state: disk parsed partitions*@gpt: GPT header ptr, filled on return.*@ptes: PTEs ptr, filled on return.* Description: Returns 1 if valid, 0 on error.
alloc_pvdalloc_pvd(): reads physical volume descriptor*@state*@lba* Description: Returns pvd on success, NULL on error.* Allocates space for pvd and fill it with disk blocks at @lba* Notes: remember to free pvd when you're done!
alloc_lvnalloc_lvn(): reads logical volume names*@state*@lba* Description: Returns lvn on success, NULL on error.* Allocates space for lvn and fill it with disk blocks at @lba* Notes: remember to free lvn when you're done!