Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:static size_t read_lba(struct parsed_partitions *state, u64 lba, u8 *buffer, size_t count)

Type:size_t

Parameter:

TypeParameterName
struct parsed_partitions *state
u64lba
u8 *buffer
size_tcount
99  totalreadcount = 0
101  If Not buffer || lba + count / 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 Then Return 0
104  When count cycle
105  copied = 512
107  data = read_part_sector(state, lba++, & sect)
108  If Not data Then Break
110  If copied > count Then copied = count
112  memcpy(buffer, data, copied)
113  put_dev_sector(sect)
114  buffer += copied
115  totalreadcount += copied
116  count -= copied
118  Return totalreadcount
Caller
NameDescribe
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!