diff options
author | Chandra Seetharaman <sekharan@us.ibm.com> | 2013-07-11 01:00:40 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-07-11 11:35:32 -0400 |
commit | 92f8ff73f18672b03ec8b92197cdddf2b5de7ea0 (patch) | |
tree | b90205ed9a1e141d8ac5d096f4d8984e89774d2e /fs/xfs/xfs_ioctl.c | |
parent | 42c49d7f249c2487f36d3314753d5d8ebcee8249 (diff) |
xfs: Add pquota fields where gquota is used.
Add project quota changes to all the places where group quota field
is used:
* add separate project quota members into various structures
* split project quota and group quotas so that instead of overriding
the group quota members incore, the new project quota members are
used instead
* get rid of usage of the OQUOTA flag incore, in favor of separate
group and project quota flags.
* add a project dquot argument to various functions.
Not using the pquotino field from superblock yet.
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_ioctl.c')
-rw-r--r-- | fs/xfs/xfs_ioctl.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index dc5b65983e5f..6e2bca5d44d6 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c | |||
@@ -928,7 +928,7 @@ xfs_ioctl_setattr( | |||
928 | struct xfs_trans *tp; | 928 | struct xfs_trans *tp; |
929 | unsigned int lock_flags = 0; | 929 | unsigned int lock_flags = 0; |
930 | struct xfs_dquot *udqp = NULL; | 930 | struct xfs_dquot *udqp = NULL; |
931 | struct xfs_dquot *gdqp = NULL; | 931 | struct xfs_dquot *pdqp = NULL; |
932 | struct xfs_dquot *olddquot = NULL; | 932 | struct xfs_dquot *olddquot = NULL; |
933 | int code; | 933 | int code; |
934 | 934 | ||
@@ -957,7 +957,7 @@ xfs_ioctl_setattr( | |||
957 | if (XFS_IS_QUOTA_ON(mp) && (mask & FSX_PROJID)) { | 957 | if (XFS_IS_QUOTA_ON(mp) && (mask & FSX_PROJID)) { |
958 | code = xfs_qm_vop_dqalloc(ip, ip->i_d.di_uid, | 958 | code = xfs_qm_vop_dqalloc(ip, ip->i_d.di_uid, |
959 | ip->i_d.di_gid, fa->fsx_projid, | 959 | ip->i_d.di_gid, fa->fsx_projid, |
960 | XFS_QMOPT_PQUOTA, &udqp, &gdqp); | 960 | XFS_QMOPT_PQUOTA, &udqp, NULL, &pdqp); |
961 | if (code) | 961 | if (code) |
962 | return code; | 962 | return code; |
963 | } | 963 | } |
@@ -994,8 +994,8 @@ xfs_ioctl_setattr( | |||
994 | XFS_IS_PQUOTA_ON(mp) && | 994 | XFS_IS_PQUOTA_ON(mp) && |
995 | xfs_get_projid(ip) != fa->fsx_projid) { | 995 | xfs_get_projid(ip) != fa->fsx_projid) { |
996 | ASSERT(tp); | 996 | ASSERT(tp); |
997 | code = xfs_qm_vop_chown_reserve(tp, ip, udqp, gdqp, | 997 | code = xfs_qm_vop_chown_reserve(tp, ip, udqp, NULL, |
998 | capable(CAP_FOWNER) ? | 998 | pdqp, capable(CAP_FOWNER) ? |
999 | XFS_QMOPT_FORCE_RES : 0); | 999 | XFS_QMOPT_FORCE_RES : 0); |
1000 | if (code) /* out of quota */ | 1000 | if (code) /* out of quota */ |
1001 | goto error_return; | 1001 | goto error_return; |
@@ -1113,7 +1113,7 @@ xfs_ioctl_setattr( | |||
1113 | if (xfs_get_projid(ip) != fa->fsx_projid) { | 1113 | if (xfs_get_projid(ip) != fa->fsx_projid) { |
1114 | if (XFS_IS_QUOTA_RUNNING(mp) && XFS_IS_PQUOTA_ON(mp)) { | 1114 | if (XFS_IS_QUOTA_RUNNING(mp) && XFS_IS_PQUOTA_ON(mp)) { |
1115 | olddquot = xfs_qm_vop_chown(tp, ip, | 1115 | olddquot = xfs_qm_vop_chown(tp, ip, |
1116 | &ip->i_gdquot, gdqp); | 1116 | &ip->i_pdquot, pdqp); |
1117 | } | 1117 | } |
1118 | xfs_set_projid(ip, fa->fsx_projid); | 1118 | xfs_set_projid(ip, fa->fsx_projid); |
1119 | 1119 | ||
@@ -1160,13 +1160,13 @@ xfs_ioctl_setattr( | |||
1160 | */ | 1160 | */ |
1161 | xfs_qm_dqrele(olddquot); | 1161 | xfs_qm_dqrele(olddquot); |
1162 | xfs_qm_dqrele(udqp); | 1162 | xfs_qm_dqrele(udqp); |
1163 | xfs_qm_dqrele(gdqp); | 1163 | xfs_qm_dqrele(pdqp); |
1164 | 1164 | ||
1165 | return code; | 1165 | return code; |
1166 | 1166 | ||
1167 | error_return: | 1167 | error_return: |
1168 | xfs_qm_dqrele(udqp); | 1168 | xfs_qm_dqrele(udqp); |
1169 | xfs_qm_dqrele(gdqp); | 1169 | xfs_qm_dqrele(pdqp); |
1170 | xfs_trans_cancel(tp, 0); | 1170 | xfs_trans_cancel(tp, 0); |
1171 | if (lock_flags) | 1171 | if (lock_flags) |
1172 | xfs_iunlock(ip, lock_flags); | 1172 | xfs_iunlock(ip, lock_flags); |