函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:aix_partition

函数原型:int aix_partition(struct parsed_partitions *state)

返回类型:int

参数:

类型参数名称
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  如果d
191  p等于d
192  lvm_version等于be16_to_cpu(version)
195  如果lvm_version恒等于1则
198  pp_bytes_size等于1左移pp_size_log2
199  pp_blocks_size等于pp_bytes_size除512
205  否则
210  长字符串拼接
211  put_dev_sector(sect)
213  如果vgda_sectord等于read_part_sector(state, vgda_sector, & sect)则
214  p等于d
216  numlvs等于be16_to_cpu(numlvs)
217  put_dev_sector(sect)
219  lvip等于分配数组内存并置零
220  如果非lvip则返回:0
222  如果numlvsd等于read_part_sector(state, vgda_sector + 1, & sect)则
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  如果n
228  foundlvs等于0
230 foundlvs小于numlvsi小于limit循环
232  如果pps_per_lvfoundlvs加等于1
238  put_dev_sector(sect)
240  如果pvd
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 i小于numpps循环
249  p等于ppei
252  lp_ix等于be16_to_cpu(lp_ix)
253  如果非lp_ix
254  next_lp_ix等于1
255  继续下一循环
257  lv_ix等于be16_to_cpu(lv_ix)减1
258  如果lv_ix大于等于limit
259  cur_lv_ix等于负1
260  继续下一循环
262  pps_found加等于1
263  如果lp_ix恒等于1则
264  cur_lv_ix等于lv_ix
265  next_lp_ix等于1
266  否则如果lv_ix不等于cur_lv_ixlp_ix不等于next_lp_ix
267  next_lp_ix等于1
268  继续下一循环
270  如果lp_ix恒等于pps_per_lv
282  否则next_lp_ix加等于1
285 i小于limit循环如果pps_found且非lv_is_contiguous
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  打印警告信息("partition %s (%u pp's found) is not contiguous\n", tmp, pps_found)
294  释放内存
296  释放内存
297  释放内存
298  返回:ret
调用者
名称描述
msdos_partition