/* Directory tree accounting is implemented using project quotas, where the project identifier is inherited from parent directories. A statvfs (df, etc.) of a directory that is using project quota should return a statvfs of the project, not the entire filesystem. This makes such trees appear as if they are filesystems in themselves.  */
void xfs_qm_statvfs(xfs_inode_t *ip, struct kstatfs *statp)
/* Directory tree accounting is implemented using project quotas, where the project identifier is inherited from parent directories. A statvfs (df, etc.) of a directory that is using project quota should return a statvfs of the project, not the entire filesystem. This makes such trees appear as if they are filesystems in themselves.  */
void xfs_qm_statvfs(xfs_inode_t *ip, struct kstatfs *statp)
{
	xfs_mount_t		*mp = ip->i_mount;
	xfs_dquot_t		*dqp;
	if (!xfs_qm_dqget(mp, NULL, ip->i_d.di_projid, XFS_DQ_PROJ, 0, &dqp)) {
		xfs_fill_statvfs_from_dquot(statp, &dqp->q_core);
		xfs_qm_dqput(dqp);
	}
}