Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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 activityDownload SCCTChinese

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:

TypeParameterName
struct inode *inode
qsize_tnumber
intflags
1651  ret = 0
1653  reserve = flags & DQUOT_SPACE_RESERVE
1656  If Not dquot_active(inode) Then
1657  If reserve Then
1661  Else
1664  Go to out
1667  When cnt < MAXQUOTAS cycle 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  spin_lock( & _blocks, i_bytes, maybe i_size )
1673  When cnt < MAXQUOTAS cycle
1674  If Not dquots[cnt] Then Continue
1676  If reserve Then
1679  Else
1683  If ret Then
1685  When cnt >= 0 cycle
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
1702  Else Caller is here responsible for sufficient locking (ie. inode->i_lock)
1704  spin_unlock( & _blocks, i_bytes, maybe i_size )
1706  If reserve Then Go to out_flush_warn
1708  Dirtify all the dquots - this can block when journalling
1709  out_flush_warn :
1710  srcu_read_unlock - unregister a old reader from an SRCU-protected structure.*@ssp: srcu_struct in which to unregister the old reader.*@idx: return value from corresponding srcu_read_lock().* Exit an SRCU read-side critical section.
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  Return ret
Caller
NameDescribe
dquot_alloc_space_nodirty
dquot_alloc_space_nofail
dquot_prealloc_block_nodirty
dquot_reserve_block