函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Transfer the number of inode and blocks from one diskquota to an other

函数原型:int __dquot_transfer(struct inode *inode, struct dquot **transfer_to)

返回类型:int

参数:

类型参数名称
struct inode *inode
struct dquot **transfer_to
1951  rsv_space等于0
1952  inode_usage等于1
1953  struct dquot * transfer_from[3] = {}
1954  ret等于0
1955  char is_valid[3] = {}
1960  如果IS_NOQUOTA(inode)则返回:0
1963  如果get_inode_usage
1964  ret等于get_inode_usage(inode, & inode_usage)
1965  如果ret则返回:ret
1970 cnt小于MAXQUOTAS循环
1971  w_type等于Definitions for quota netlink interface
1972  w_type等于Definitions for quota netlink interface
1973  w_type等于Definitions for quota netlink interface
1976  加自旋锁
1977  加自旋锁
1978  如果IS_NOQUOTA(inode)则
1979  自旋锁解锁
1980  自旋锁解锁
1981  返回:0
1983  cur_space等于__inode_get_bytes(inode)
1984  rsv_space等于__inode_get_rsv_space(inode)
1989 cnt小于MAXQUOTAS循环
1993  如果非transfer_to[cnt]则继续下一循环
1996  如果非sb_has_quota_active(i_sb, cnt)则继续下一循环
1998  is_valid[cnt]等于1
1999  transfer_from[cnt]等于i_dquot(inode)[cnt]
2000  ret等于dquot_add_inodes(transfer_to[cnt], inode_usage, & warn_to[cnt])
2002  如果ret则转到:over_quota
2004  ret等于dquot_add_space(transfer_to[cnt], cur_space, rsv_space, DQUOT_SPACE_WARN, & warn_to[cnt])
2006  如果ret
2007  加自旋锁
2010  转到:over_quota
2015 cnt小于MAXQUOTAS循环
2016  如果非is_valid[cnt]则继续下一循环
2019  如果transfer_from[cnt]则
2022  加自旋锁
2038  i_dquot(inode)[cnt]等于transfer_to[cnt]
2040  自旋锁解锁
2041  自旋锁解锁
2043  Dirtify all the dquots - this can block when journalling
2044  Dirtify all the dquots - this can block when journalling
2045  Write warnings to the console and send warning messages over netlink.* Note that this function can call into tty and networking code.
2046  Write warnings to the console and send warning messages over netlink.* Note that this function can call into tty and networking code.
2047  Write warnings to the console and send warning messages over netlink.* Note that this function can call into tty and networking code.
2049 cnt小于MAXQUOTAS循环如果is_valid[cnt]则
2051  transfer_to[cnt]等于transfer_from[cnt]
2052  返回:0
2053  over_quota :
2055 cnt大于等于0循环
2056  如果非is_valid[cnt]则继续下一循环
2058  加自旋锁
2059  dquot_decr_inodes(transfer_to[cnt], inode_usage)
2060  dquot_decr_space(transfer_to[cnt], cur_space)
2061  dquot_free_reserved_space(transfer_to[cnt], rsv_space)
2062  自旋锁解锁
2064  自旋锁解锁
2065  自旋锁解锁
2066  Write warnings to the console and send warning messages over netlink.* Note that this function can call into tty and networking code.
2067  返回:ret
调用者
名称描述
dquot_transferWrapper for transferring ownership of an inode for uid/gid only* Called from FSXXX_setattr()