Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\quota\quota_tree.c Create Date:2022-07-28 20:33:25
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:find_next_id

Proto:static int find_next_id(struct qtree_mem_dqinfo *info, qid_t *id, unsigned int blk, int depth)

Type:int

Parameter:

TypeParameterName
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  If Not buf Then Return -ENOMEM
692  When i < Precomputed depth of quota tree - 1 cycle level_inc *= epb
695  ret = read_blk(info, blk, buf)
696  If ret < 0 Then
697  quota_error(Sb quota is on , "Can't read quota tree block %u", blk)
699  Go to out_buf
701  When i < epb cycle
702  If ref[i] == cpu_to_le32(0) Then
703  id += level_inc
704  Continue
707  ret = 0
708  Go to out_buf
710  ret = find_next_id(info, id, le32_to_cpu(ref[i]), depth + 1)
711  If ret != -ENOENT Then Break
714  If i == epb Then
715  ret = -ENOENT
716  Go to out_buf
718  out_buf :
719  kfree(buf)
720  Return ret
Caller
NameDescribe
find_next_id
qtree_get_next_id