Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Write information header to quota file

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

Type:int

Parameter:

TypeParameterName
struct super_block *sb
inttype
172  dqopt = sb_dqopt(sb)
173  info = Information for each quota type [type]
174  qinfo = dqi_priv
177  lock for writing
178  spin_lock( & dq_data_lock)
179  DFQ_ flags [dq_data_lock] &= ~Is info dirty?
180  Time before block soft limit becomes hard limit = cpu_to_le32( Space grace time [dq_data_lock] )
181  Time before inode soft limit becomes hard limit = cpu_to_le32( Inode grace time [dq_data_lock] )
183  Flags for quotafile (DQF_*) = cpu_to_le32(0)
184  spin_unlock( & dq_data_lock)
185  Number of blocks in file = cpu_to_le32(# of blocks in quota file )
186  Number of first free block in the list = cpu_to_le32(First block in list of free blocks )
187  Number of block with at least one free entry = cpu_to_le32(First block with free entry )
188  size = quota_write(sb, type, (char * ) & dinfo, sizeof(structv2_disk_dqinfo), Offset of info header in file )
190  lease a write lock
191  If size != sizeof(structv2_disk_dqinfo) Then
192  quota_error(sb, "Can't write info structure")
193  Return -1
195  Return 0