函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Read information header from quota file

函数原型:static int v2_read_file_info(struct super_block *sb, int type)

返回类型:int

参数:

类型参数名称
struct super_block *sb
inttype
96  dqopt等于sb_dqopt(sb)
97  info等于 Information for each quota type [type]
103  lock for reading
104  ret等于v2_read_header(sb, type, & dqhead)
105  如果ret小于0则转到:out
107  version等于le32_to_cpu(File version )
108  如果 Id of the dqi_format - used when turning * quotas on after remount RW 恒等于QFMT_VFS_V0version不等于0或 Id of the dqi_format - used when turning * quotas on after remount RW 恒等于QFMT_VFS_V1version不等于1则
110  ret等于负EINVAL
111  转到:out
114  size等于quota_read(sb, type, (char * ) & dinfo, sizeof(structv2_disk_dqinfo), Offset of info header in file )
116  如果size不等于sizeof(structv2_disk_dqinfo)则
117  quota_error(sb, "Can't read info structure")
118  如果size小于0则ret等于size
120  否则ret等于负EIO
122  转到:out
124  dqi_priv等于开辟内存
125  如果非dqi_priv
126  ret等于负ENOMEM
127  转到:out
129  qinfo等于dqi_priv
130  如果version恒等于0则
132  Maximum space limit [static] 等于0xffffffffLL左移QUOTABLOCK_BITS
133  Maximum inode limit [static] 等于0xffffffff
134  否则
140  Maximum space limit [static] 等于0x7fffffffffffffffLL
141  Maximum inode limit [static] 等于0x7fffffffffffffffLL
143  Space grace time [dq_data_lock] 等于le32_to_cpu(Time before block soft limit becomes hard limit )
144  Inode grace time [dq_data_lock] 等于le32_to_cpu(Time before inode soft limit becomes hard limit )
146  DFQ_ flags [dq_data_lock] 等于0
147  Sb quota is on 等于sb
148  Quota type 等于type
149  # of blocks in quota file 等于le32_to_cpu(Number of blocks in file )
150  First block in list of free blocks 等于le32_to_cpu(Number of first free block in the list )
151  First block with free entry 等于le32_to_cpu(Number of block with at least one free entry )
152  Block size of quota file 等于Size of leaf block in tree
153  Space usable in block for quota data 等于1左移Size of leaf block in tree
154  Precomputed depth of quota tree 等于qtree_depth(qinfo)
155  如果version恒等于0则
156  Size of quota entry in quota file 等于sizeof(structv2r0_disk_dqblk)
157  Operations for entry manipulation 等于v2r0_qtree_ops
158  否则
159  Size of quota entry in quota file 等于sizeof(structv2r1_disk_dqblk)
160  Operations for entry manipulation 等于v2r1_qtree_ops
162  ret等于0
163  out :
164  lease a read lock
165  返回:ret