Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\quota\dquot.c Create Date:2022-07-28 20:32:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:dquot_add_inodes

Proto:static int dquot_add_inodes(struct dquot *dquot, qsize_t inodes, struct dquot_warn *warn)

Type:int

Parameter:

TypeParameterName
struct dquot *dquot
qsize_tinodes
struct dquot_warn *warn
1269  ret = 0
1271  spin_lock( & Lock protecting dq_dqb changes )
1272  newinodes = current # allocated inodes + inodes
1273  If Not sb_has_quota_limits_enabled( superblock this applies to , USRQUOTA (uid) or GRPQUOTA (gid) or PRJQUOTA (projid) ) || st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then Go to add
1277  If absolute limit on allocated inodes && newinodes > absolute limit on allocated inodes && Not ignore_hardlimit(dquot) Then
1280  prepare_warning(warn, dquot, Inode hardlimit reached )
1281  ret = -EDQUOT
1282  Go to out
1285  If preferred inode limit && newinodes > preferred inode limit && ime limit for excessive inode use && ktime_get_real_seconds - Get the seconds portion of CLOCK_REALTIME* Returns the wall clock seconds since 1970. This replaces the* get_seconds() interface which is not y2038 safe on 32bit systems. >= ime limit for excessive inode use && Not ignore_hardlimit(dquot) Then
1290  prepare_warning(warn, dquot, Inode grace time expired )
1291  ret = -EDQUOT
1292  Go to out
1295  If preferred inode limit && newinodes > preferred inode limit && ime limit for excessive inode use == 0 Then
1298  prepare_warning(warn, dquot, Inode softlimit reached )
1299  ime limit for excessive inode use = ktime_get_real_seconds - Get the seconds portion of CLOCK_REALTIME* Returns the wall clock seconds since 1970. This replaces the* get_seconds() interface which is not y2038 safe on 32bit systems. + Inode grace time [dq_data_lock]
1302  add :
1303  current # allocated inodes = newinodes
1305  out :
1306  spin_unlock( & Lock protecting dq_dqb changes )
1307  Return ret
Caller
NameDescribe
dquot_alloc_inodeThis operation can block, but only after everything is updated
__dquot_transferTransfer the number of inode and blocks from one diskquota to an other