| Function report | 
| 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 activity | Download SCCT | Chinese | 
Name:qtree_read_dquot
Proto:int qtree_read_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct qtree_mem_dqinfo * | info | |
| struct dquot * | dquot | 
| 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 | 
| 624 | If offset <= 0 Then | 
| 625 | If offset < 0 Then quota_error(sb, "Can't read 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) )) | 
| 632 | memset( & Diskquota usage [dq_dqb_lock] , 0, sizeof(structmem_dqblk)) | 
| 634 | Go to out | 
| 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 | 
| 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) )) | 
| 649 | memset( & Diskquota usage [dq_dqb_lock] , 0, sizeof(structmem_dqblk)) | 
| 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 | 
| 662 | out : | 
| 663 | dqstats_inc(DQST_READS) | 
| 664 | Return ret | 
| Name | Describe | 
|---|---|
| v2_read_dquot | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |