Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:v1_check_quota_file

Proto:static int v1_check_quota_file(struct super_block *sb, int type)

Type:int

Parameter:

TypeParameterName
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  If Not isize Then Return 0
140  blocks = isize >> BLOCK_SIZE_BITS
141  off = isize & BLOCK_SIZE - 1
142  If ( blocks % sizeof(structv1_disk_dqblk) * BLOCK_SIZE + off) % sizeof(structv1_disk_dqblk) Then Return 0
147  size = quota_read(sb, type, (char * ) & dqhead, sizeof(structv2_disk_dqheader), 0)
149  If size != sizeof(structv2_disk_dqheader) Then Return 1
151  If le32_to_cpu(Magic number identifying file ) != quota_magics[type] Then Return 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  Return 0