Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:aix_partition

Proto:int aix_partition(struct parsed_partitions *state)

Type:int

Parameter:

TypeParameterName
struct parsed_partitions *state
173  ret = 0
177  pp_blocks_size = 0
178  vgda_sector = 0
179  vgda_len = 0
180  numlvs = 0
181  struct pvd * pvd = NULL
182  struct lv_info{unsigned short pps_per_lv;unsigned short pps_found;unsigned char lv_is_contiguous;} * lvip
187  struct lvname * n = NULL
189  d = read_part_sector(state, 7, & sect)
190  If d Then
191  p = d
192  lvm_version = be16_to_cpu(version)
195  If lvm_version == 1 Then
205  Else
210  strlcat - Append a length-limited, C-string to another*@dest: The string to be appended to*@src: The string to append to it*@count: The size of the destination buffer.
211  put_dev_sector(sect)
213  If vgda_sector && (d = read_part_sector(state, vgda_sector, & sect)) Then
214  p = d
216  numlvs = be16_to_cpu(numlvs)
217  put_dev_sector(sect)
219  lvip = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
220  If Not lvip Then Return 0
222  If numlvs && (d = read_part_sector(state, vgda_sector + 1, & sect)) Then
223  p = d
226  n = alloc_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!
227  If n Then
228  foundlvs = 0
230  When foundlvs < numlvs && i < limit cycle
232  If pps_per_lv Then foundlvs += 1
238  put_dev_sector(sect)
240  If pvd Then
241  numpps = be16_to_cpu(pp_count)
242  psn_part1 = be32_to_cpu(psn_part1)
244  cur_lv_ix = -1
245  next_lp_ix = 1
248  When i < numpps cycle
249  p = ppe + i
253  If Not lp_ix Then
254  next_lp_ix = 1
255  Continue
257  lv_ix = be16_to_cpu(lv_ix) - 1
258  If lv_ix >= limit Then
259  cur_lv_ix = -1
260  Continue
262  pps_found += 1
263  If lp_ix == 1 Then
264  cur_lv_ix = lv_ix
265  next_lp_ix = 1
266  Else if lv_ix != cur_lv_ix || lp_ix != next_lp_ix Then
267  next_lp_ix = 1
268  Continue
270  If lp_ix == pps_per_lv Then
282  Else next_lp_ix += 1
285  When i < limit cycle If pps_found && Not lv_is_contiguous Then
289  snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
290  pr_warn("partition %s (%u pp's found) is not contiguous\n", tmp, pps_found)
294  kfree(pvd)
296  kfree(n)
297  kfree(lvip)
298  Return ret
Caller
NameDescribe
msdos_partition