[lustre-devel] [PATCH 05/15] lustre: llite: only statfs for projid if PROJINHERIT set
James Simmons <[email protected]>
| Newsgroups | org.lustre.lists.lustre-devel |
|---|---|
| Message-ID | <[email protected]> |
From: Andreas Dilger <[email protected]> If projid is set on a directory but PROJINHERIT is not, do not report the project quota for statfs. This matches how ext4_statfs() and xfs_fs_statfs() behave, on which Lustre project quota is modelled. Fixes: 323e22e731 ("lustre: quota: df should return projid-specific values") WC-bug-id: https://jira.whamcloud.com/browse/LU-15721 Lustre-commit: 59f0d691686c9ab8e ("LU-15721 llite: only statfs for projid if PROJINHERIT set") Signed-off-by: Andreas Dilger <[email protected]> Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/47352 Reviewed-by: Wang Shilong <[email protected]> Reviewed-by: Li Dongyang <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: James Simmons <[email protected]> --- fs/lustre/llite/llite_lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/lustre/llite/llite_lib.c b/fs/lustre/llite/llite_lib.c index 55a9202..81c7fa3 100644 --- a/fs/lustre/llite/llite_lib.c +++ b/fs/lustre/llite/llite_lib.c @@ -2510,7 +2510,8 @@ int ll_statfs(struct dentry *de, struct kstatfs *sfs) sfs->f_bavail = osfs.os_bavail; sfs->f_fsid.val[0] = (u32)fsid; sfs->f_fsid.val[1] = (u32)(fsid >> 32); - if (ll_i2info(de->d_inode)->lli_projid) + if (ll_i2info(de->d_inode)->lli_projid && + test_bit(LLIF_PROJECT_INHERIT, &ll_i2info(de->d_inode)->lli_flags)) return ll_statfs_project(de->d_inode, sfs); ll_stats_ops_tally(ll_s2sbi(sb), LPROC_LL_STATFS, -- 1.8.3.1 _______________________________________________ lustre-devel mailing list [email protected] http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org