[LU-15721] projid quota limit statfs() on directories only with PROJINHERIT Created: 05/Apr/22  Updated: 06/Jan/24  Resolved: 15/Oct/22

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.16.0

Type: Bug Priority: Minor
Reporter: Andreas Dilger Assignee: Andreas Dilger
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-16771 statfs_max_age not used with statfs()... Reopened
is related to LU-17395 df -h is limited by project quota eve... Open
is related to LU-9555 "df /path/to/project" should return p... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

LU-9555 limited the data returned from statfs() (df) to the limits associated with a specific project quota if the directory has lli_projid set to a non-zero value.

However, for consistency with ext4 and XFS (on which the project quota feature is based) this quota limit should only be imposed if the PROJINHERIT flag is set on the inode:

static int ext4_statfs(struct dentry *dentry, struct kstatfs *buf)
{
        :
        :
#ifdef CONFIG_QUOTA
        if (ext4_test_inode_flag(dentry->d_inode, EXT4_INODE_PROJINHERIT) &&
            sb_has_quota_limits_enabled(sb, PRJQUOTA))
                ext4_statfs_project(sb, EXT4_I(dentry->d_inode)->i_projid, buf);
#endif
}

int xfs_fs_statfs(struct dentry *dentry, struct kstatfs *statp)
{
        :
        if ((ip->i_diflags & XFS_DIFLAG_PROJINHERIT) &&
            ((mp->m_qflags & (XFS_PQUOTA_ACCT|XFS_PQUOTA_ENFD))) ==
                              (XFS_PQUOTA_ACCT|XFS_PQUOTA_ENFD))
                xfs_qm_statvfs(ip, statp);
}


 Comments   
Comment by Gerrit Updater [ 14/May/22 ]

"Andreas Dilger <adilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/47352
Subject: LU-15721 llite: only statfs for projid if PROJINHERIT set
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 31421aa0376dc10d2e20dff7dcc18a0f3723c305

Comment by Gerrit Updater [ 15/Oct/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/47352/
Subject: LU-15721 llite: only statfs for projid if PROJINHERIT set
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 59f0d691686c9ab8ed6f9852dc3189a3b00d4cb7

Comment by Andreas Dilger [ 15/Oct/22 ]

Landed for 2.16.

Generated at Sat Feb 10 03:20:44 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.