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:Find space for dquot
Proto:static uint find_free_dqentry(struct qtree_mem_dqinfo *info, struct dquot *dquot, int *err)
Type:uint
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct qtree_mem_dqinfo * | info | |
| struct dquot * | dquot | |
| int * | err |
| 233 | err = 0 |
| 234 | If Not buf Then |
| 239 | If First block with free entry Then |
| 244 | Else |
| 246 | If blk < 0 Then |
| 251 | memset(buf, 0, Space usable in block for quota data ) |
| 258 | If le16_to_cpu(Number of valid entries in block ) + 1 >= Number of entries in one blocks Then |
| 260 | If err < 0 Then |
| 261 | quota_error( superblock this applies to , "Can't remove block (%u) from entry free list", blk) |
| 263 | Go to out_buf |
| 266 | le16_add_cpu( & Number of valid entries in block , 1) |
| 268 | ddquot = buf + sizeof(structqt_disk_dqdbheader) |
| 269 | When i < Number of entries in one blocks cycle |
| 270 | If Is the entry in the block free? Then Break |
| 275 | If i == Number of entries in one blocks Then |
| 276 | quota_error( superblock this applies to , "Data block full but it shouldn't") |
| 278 | Go to out_buf |
| 282 | If err < 0 Then |
| 283 | quota_error( superblock this applies to , "Can't write quota data block %u", blk) |
| 285 | Go to out_buf |
| 287 | Offset of dquot on disk [dq_lock, stable once set] = (blk << Block size of quota file ) + sizeof(structqt_disk_dqdbheader) + i * Size of quota entry in quota file |
| 291 | Return blk |
| 292 | out_buf : |
| 294 | Return 0 |
| Name | Describe |
|---|---|
| do_insert_tree | Insert reference to structure into the trie |
| 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 |