Function report |
Source Code:fs\quota\quota_tree.c |
Create Date:2022-07-28 20:33:24 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Free dquot entry in data block
Proto:static int free_dqentry(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint blk)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct qtree_mem_dqinfo * | info | |
struct dquot * | dquot | |
uint | blk |
418 | ret = 0 |
422 | If Offset of dquot on disk [dq_lock, stable once set] >> Block size of quota file != blk Then |
423 | quota_error( superblock this applies to , "Quota structure has offset to other block (%u) than it should (%u)", blk, (uint)( Offset of dquot on disk [dq_lock, stable once set] >> Block size of quota file )) |
426 | Go to out_buf |
429 | If ret < 0 Then |
430 | quota_error( superblock this applies to , "Can't read quota data block %u", blk) |
432 | Go to out_buf |
435 | le16_add_cpu( & Number of valid entries in block , - 1) |
436 | If Not le16_to_cpu(Number of valid entries in block ) Then |
438 | If ret >= 0 Then ret = Insert empty block to the list |
440 | If ret < 0 Then |
441 | quota_error( superblock this applies to , "Can't move quota data block (%u) to free list", blk) |
443 | Go to out_buf |
445 | Else |
446 | memset(buf + ( Offset of dquot on disk [dq_lock, stable once set] & ((1 << Block size of quota file ) - 1)), 0, Size of quota entry in quota file ) |
449 | If le16_to_cpu(Number of valid entries in block ) == Number of entries in one blocks - 1 Then |
453 | If ret < 0 Then |
454 | quota_error( superblock this applies to , "Can't insert quota data block (%u) to free entry list", blk) |
456 | Go to out_buf |
458 | Else |
460 | If ret < 0 Then |
461 | quota_error( superblock this applies to , "Can't write quota data block %u", blk) |
463 | Go to out_buf |
468 | out_buf : |
470 | Return ret |
Name | Describe |
---|---|
remove_tree | Remove reference to dquot from tree |
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 |