Function report |
Source Code:fs\quota\dquot.c |
Create Date:2022-07-28 20:32:54 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:This operation can block, but only after everything is updated
Proto:int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct inode * | inode | |
| qsize_t | number | |
| int | flags |
| 1651 | ret = 0 |
| 1653 | reserve = flags & DQUOT_SPACE_RESERVE |
| 1656 | If Not dquot_active(inode) Then |
| 1657 | If reserve Then |
| 1658 | spin_lock( & _blocks, i_bytes, maybe i_size ) |
| 1659 | de_reserved_space is managed internally by quota, and protected by* i_lock similar to i_blocks+i_bytes. += number |
| 1660 | spin_unlock( & _blocks, i_bytes, maybe i_size ) |
| 1661 | Else |
| 1662 | inode_add_bytes(inode, number) |
| 1664 | Go to out |
| 1667 | When cnt < MAXQUOTAS cycle w_type = Definitions for quota netlink interface |
| 1672 | spin_lock( & _blocks, i_bytes, maybe i_size ) |
| 1676 | If reserve Then |
| 1679 | Else |
| 1683 | If ret Then |
| 1688 | spin_lock( & Lock protecting dq_dqb changes ) |
| 1689 | If reserve Then dquot_free_reserved_space(dquots[cnt], number) |
| 1692 | Else dquot_decr_space(dquots[cnt], number) |
| 1694 | spin_unlock( & Lock protecting dq_dqb changes ) |
| 1696 | spin_unlock( & _blocks, i_bytes, maybe i_size ) |
| 1697 | Go to out_flush_warn |
| 1700 | If reserve Then de_reserved_space is managed internally by quota, and protected by* i_lock similar to i_blocks+i_bytes. += number |
| 1704 | spin_unlock( & _blocks, i_bytes, maybe i_size ) |
| 1706 | If reserve Then Go to out_flush_warn |
| 1709 | out_flush_warn : |
| 1712 | out : |
| 1713 | Return ret |
| Name | Describe |
|---|---|
| dquot_alloc_space_nodirty | |
| dquot_alloc_space_nofail | |
| dquot_prealloc_block_nodirty | |
| dquot_reserve_block |
| 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 |