函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ad_lba(): Read bytes from disk, starting at given LBA*@state*@lba*@buffer*@count* Description: Reads @count bytes from @state->bdev into @buffer.* Returns number of bytes read on success, 0 on error.

函数原型: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
99  totalreadcount等于0
101  如果非bufferlbacount除512大于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
104 count循环
105  copied等于512
107  data等于read_part_sector(state, lba++, & sect)
108  如果非data退出
110  如果copied大于countcopied等于count
112  memcpy(buffer, data, copied)
113  put_dev_sector(sect)
114  buffer加等于copied
115  totalreadcount加等于copied
116  count减等于copied
118  返回:totalreadcount
调用者
名称描述
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!