函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\quota\quota_tree.c Create Date:2022-07-29 11:09:50
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:find_next_id

函数原型:static int find_next_id(struct qtree_mem_dqinfo *info, qid_t *id, unsigned int blk, int depth)

返回类型:int

参数:

类型参数名称
struct qtree_mem_dqinfo *info
qid_t *id
unsigned intblk
intdepth
682  buf等于getdqbuf(Space usable in block for quota data )
683  ref等于buf
685  epb等于Space usable in block for quota data 右移2位
686  level_inc等于1
689  如果非buf则返回:负ENOMEM
692 i小于Precomputed depth of quota tree 减1循环level_inc乘等于epb
695  ret等于read_blk(info, blk, buf)
696  如果ret小于0则
697  quota_error(Sb quota is on , "Can't read quota tree block %u", blk)
699  转到:out_buf
701 i小于epb循环
702  如果ref[i]恒等于cpu_to_le32(0)则
703  id加等于level_inc
704  继续下一循环
706  如果depth恒等于Precomputed depth of quota tree 减1则
707  ret等于0
708  转到:out_buf
710  ret等于find_next_id(info, id, le32_to_cpu(ref[i]), depth + 1)
711  如果ret不等于负ENOENT退出
714  如果i恒等于epb
715  ret等于负ENOENT
716  转到:out_buf
718  out_buf :
719  释放内存
720  返回:ret
调用者
名称描述
find_next_id
qtree_get_next_id