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:qtree_read_dquot

Proto:int qtree_read_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot)

Type:int

Parameter:

TypeParameterName
struct qtree_mem_dqinfo *info
struct dquot *dquot
608  type = USRQUOTA (uid) or GRPQUOTA (gid) or PRJQUOTA (projid)
609  sb = superblock this applies to
612  ret = 0
616  If Not inodes of quotafiles [type] Then
617  quota_error(sb, "Quota invalidated while reading!")
618  Return -EIO
622  If Not Offset of dquot on disk [dq_lock, stable once set] Then
623  offset = Find entry for given id in the tree - wrapper function
624  If offset <= 0 Then
633  ret = offset
634  Go to out
636  Offset of dquot on disk [dq_lock, stable once set] = offset
638  ddquot = getdqbuf(Size of quota entry in quota file )
639  If Not ddquot Then Return -ENOMEM
641  ret = quota_read(sb, type, ddquot, Size of quota entry in quota file , Offset of dquot on disk [dq_lock, stable once set] )
643  If ret != Size of quota entry in quota file Then
644  If ret >= 0 Then ret = -EIO
646  quota_error(sb, "Error while reading quota structure for id %u", from_kqid( & userns count is 1 for root user, 1 for init_uts_ns,* and 1 for... ?, ID this applies to (uid, gid, projid) ))
648  Atomically set a bit in memory
649  memset( & Diskquota usage [dq_dqb_lock] , 0, sizeof(structmem_dqblk))
650  kfree(ddquot)
651  Go to out
653  spin_lock( & Lock protecting dq_dqb changes )
654  disk2mem_dqblk(dquot, ddquot)
655  If Not absolute limit on disk blks alloc && Not preferred limit on disk blks && Not absolute limit on allocated inodes && Not preferred inode limit Then Atomically set a bit in memory
660  spin_unlock( & Lock protecting dq_dqb changes )
661  kfree(ddquot)
662  out :
663  dqstats_inc(DQST_READS)
664  Return ret
Caller
NameDescribe
v2_read_dquot