函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\quota\dquot.c Create Date:2022-07-29 11:08:49
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:This operation can block, but only after everything is updated

函数原型:int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags)

返回类型:int

参数:

类型参数名称
struct inode *inode
qsize_tnumber
intflags
1651  ret等于0
1653  reserve等于flags按位与DQUOT_SPACE_RESERVE
1656  如果非dquot_active(inode)则
1657  如果reserve
1658  加自旋锁
1661  否则
1664  转到:out
1667 cnt小于MAXQUOTAS循环w_type等于Definitions for quota netlink interface
1670  dquots等于i_dquot(inode)
1671  index等于srcu_read_lock - register a new reader for an SRCU-protected structure
1672  加自旋锁
1673 cnt小于MAXQUOTAS循环
1674  如果非dquots[cnt]则继续下一循环
1676  如果reserve
1677  ret等于dquot_add_space(dquots[cnt], 0, number, flags, & warn[cnt])
1679  否则
1680  ret等于dquot_add_space(dquots[cnt], number, 0, flags, & warn[cnt])
1683  如果ret
1685 cnt大于等于0循环
1686  如果非dquots[cnt]则继续下一循环
1688  加自旋锁
1692  否则dquot_decr_space(dquots[cnt], number)
1697  转到:out_flush_warn
1700  如果reservede_reserved_space is managed internally by quota, and protected by* i_lock similar to i_blocks+i_bytes.加等于number
1702  否则Caller is here responsible for sufficient locking (ie. inode->i_lock)
1704  自旋锁解锁
1706  如果reserve则转到:out_flush_warn
1708  Dirtify all the dquots - this can block when journalling
1709  out_flush_warn :
1710  注销过期读锁
1711  Write warnings to the console and send warning messages over netlink.* Note that this function can call into tty and networking code.
1712  out :
1713  返回:ret
调用者
名称描述
dquot_alloc_space_nodirty
dquot_alloc_space_nofail
dquot_prealloc_block_nodirty
dquot_reserve_block