函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:dquot_add_space

函数原型:static int dquot_add_space(struct dquot *dquot, qsize_t space, qsize_t rsv_space, unsigned int flags, struct dquot_warn *warn)

返回类型:int

参数:

类型参数名称
struct dquot *dquot
qsize_tspace
qsize_trsv_space
unsigned intflags
struct dquot_warn *warn
1315  sb等于 superblock this applies to
1316  ret等于0
1318  加自旋锁
1319  如果非sb_has_quota_limits_enabled(sb, 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则转到:finish
1323  tspace等于current used space current reserved space for delallocspacersv_space
1326  如果absolute limit on disk blks alloc tspace大于absolute limit on disk blks alloc 且非ignore_hardlimit(dquot)则
1329  如果flags按位与DQUOT_SPACE_WARNprepare_warning(warn, dquot, Block hardlimit reached )
1331  ret等于负EDQUOT
1332  转到:finish
1335  如果preferred limit on disk blks tspace大于preferred limit on disk blks ime limit for excessive disk 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 disk use 且非ignore_hardlimit(dquot)则
1340  如果flags按位与DQUOT_SPACE_WARNprepare_warning(warn, dquot, Block grace time expired )
1342  ret等于负EDQUOT
1343  转到:finish
1346  如果preferred limit on disk blks tspace大于preferred limit on disk blks ime limit for excessive disk use 恒等于0则
1349  如果flags按位与DQUOT_SPACE_WARN
1353  否则
1358  ret等于负EDQUOT
1359  转到:finish
1362  finish :
1368  如果flags按位与DQUOT_SPACE_NOFAILret等于0
1370  如果非ret
1371  current reserved space for delalloc加等于rsv_space
1372  current used space 加等于space
1374  自旋锁解锁
1375  返回:ret
调用者
名称描述
__dquot_alloc_spaceThis operation can block, but only after everything is updated
__dquot_transferTransfer the number of inode and blocks from one diskquota to an other