.. | .. |
---|
5 | 5 | */ |
---|
6 | 6 | #include "xfs.h" |
---|
7 | 7 | #include "xfs_fs.h" |
---|
| 8 | +#include "xfs_shared.h" |
---|
8 | 9 | #include "xfs_format.h" |
---|
9 | 10 | #include "xfs_log_format.h" |
---|
10 | 11 | #include "xfs_trans_resv.h" |
---|
11 | 12 | #include "xfs_quota.h" |
---|
12 | 13 | #include "xfs_mount.h" |
---|
13 | 14 | #include "xfs_inode.h" |
---|
14 | | -#include "xfs_error.h" |
---|
15 | 15 | #include "xfs_trans.h" |
---|
16 | 16 | #include "xfs_qm.h" |
---|
17 | 17 | |
---|
.. | .. |
---|
23 | 23 | { |
---|
24 | 24 | uint64_t limit; |
---|
25 | 25 | |
---|
26 | | - limit = dqp->q_core.d_blk_softlimit ? |
---|
27 | | - be64_to_cpu(dqp->q_core.d_blk_softlimit) : |
---|
28 | | - be64_to_cpu(dqp->q_core.d_blk_hardlimit); |
---|
| 26 | + limit = dqp->q_blk.softlimit ? |
---|
| 27 | + dqp->q_blk.softlimit : |
---|
| 28 | + dqp->q_blk.hardlimit; |
---|
29 | 29 | if (limit && statp->f_blocks > limit) { |
---|
30 | 30 | statp->f_blocks = limit; |
---|
31 | 31 | statp->f_bfree = statp->f_bavail = |
---|
32 | | - (statp->f_blocks > dqp->q_res_bcount) ? |
---|
33 | | - (statp->f_blocks - dqp->q_res_bcount) : 0; |
---|
| 32 | + (statp->f_blocks > dqp->q_blk.reserved) ? |
---|
| 33 | + (statp->f_blocks - dqp->q_blk.reserved) : 0; |
---|
34 | 34 | } |
---|
35 | 35 | |
---|
36 | | - limit = dqp->q_core.d_ino_softlimit ? |
---|
37 | | - be64_to_cpu(dqp->q_core.d_ino_softlimit) : |
---|
38 | | - be64_to_cpu(dqp->q_core.d_ino_hardlimit); |
---|
| 36 | + limit = dqp->q_ino.softlimit ? |
---|
| 37 | + dqp->q_ino.softlimit : |
---|
| 38 | + dqp->q_ino.hardlimit; |
---|
39 | 39 | if (limit && statp->f_files > limit) { |
---|
40 | 40 | statp->f_files = limit; |
---|
41 | 41 | statp->f_ffree = |
---|
42 | | - (statp->f_files > dqp->q_res_icount) ? |
---|
43 | | - (statp->f_files - dqp->q_res_icount) : 0; |
---|
| 42 | + (statp->f_files > dqp->q_ino.reserved) ? |
---|
| 43 | + (statp->f_files - dqp->q_ino.reserved) : 0; |
---|
44 | 44 | } |
---|
45 | 45 | } |
---|
46 | 46 | |
---|
.. | .. |
---|
54 | 54 | */ |
---|
55 | 55 | void |
---|
56 | 56 | xfs_qm_statvfs( |
---|
57 | | - xfs_inode_t *ip, |
---|
| 57 | + struct xfs_inode *ip, |
---|
58 | 58 | struct kstatfs *statp) |
---|
59 | 59 | { |
---|
60 | | - xfs_mount_t *mp = ip->i_mount; |
---|
61 | | - xfs_dquot_t *dqp; |
---|
| 60 | + struct xfs_mount *mp = ip->i_mount; |
---|
| 61 | + struct xfs_dquot *dqp; |
---|
62 | 62 | |
---|
63 | | - if (!xfs_qm_dqget(mp, xfs_get_projid(ip), XFS_DQ_PROJ, false, &dqp)) { |
---|
| 63 | + if (!xfs_qm_dqget(mp, ip->i_d.di_projid, XFS_DQTYPE_PROJ, false, &dqp)) { |
---|
64 | 64 | xfs_fill_statvfs_from_dquot(statp, dqp); |
---|
65 | 65 | xfs_qm_dqput(dqp); |
---|
66 | 66 | } |
---|