函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:v1_check_quota_file

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

返回类型:int

参数:

类型参数名称
struct super_block *sb
inttype
129  inode等于 inodes of quotafiles [type]
135  quota_magics[]等于Magics of new quota format
137  isize等于NOTE: in a 32bit arch with a preemptable kernel and* an UP compile the i_size_read/write must be atomic* with respect to the local cpu (unlike with preempt disabled),* but they don't need to be atomic with respect to other cpus like in* true SMP (so they
138  如果非isize则返回:0
140  blocks等于isize右移BLOCK_SIZE_BITS
141  off等于isize按位与BLOCK_SIZE减1
142  如果blocks取模sizeof(structv1_disk_dqblk)乘BLOCK_SIZEoff的和取模sizeof(structv1_disk_dqblk)则返回:0
147  size等于quota_read(sb, type, (char * ) & dqhead, sizeof(structv2_disk_dqheader), 0)
149  如果size不等于sizeof(structv2_disk_dqheader)则返回:1
151  如果le32_to_cpu(Magic number identifying file )不等于quota_magics[type]则返回:1
153  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
156  返回:0