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_symlink.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_symlink.c')
-rw-r--r-- | fs/xfs/xfs_symlink.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/xfs/xfs_symlink.c b/fs/xfs/xfs_symlink.c index e830fb56e27f..f4895b662fcb 100644 --- a/fs/xfs/xfs_symlink.c +++ b/fs/xfs/xfs_symlink.c | |||
@@ -360,6 +360,7 @@ xfs_symlink( | |||
360 | prid_t prid; | 360 | prid_t prid; |
361 | struct xfs_dquot *udqp = NULL; | 361 | struct xfs_dquot *udqp = NULL; |
362 | struct xfs_dquot *gdqp = NULL; | 362 | struct xfs_dquot *gdqp = NULL; |
363 | struct xfs_dquot *pdqp = NULL; | ||
363 | uint resblks; | 364 | uint resblks; |
364 | 365 | ||
365 | *ipp = NULL; | 366 | *ipp = NULL; |
@@ -386,7 +387,7 @@ xfs_symlink( | |||
386 | * Make sure that we have allocated dquot(s) on disk. | 387 | * Make sure that we have allocated dquot(s) on disk. |
387 | */ | 388 | */ |
388 | error = xfs_qm_vop_dqalloc(dp, current_fsuid(), current_fsgid(), prid, | 389 | error = xfs_qm_vop_dqalloc(dp, current_fsuid(), current_fsgid(), prid, |
389 | XFS_QMOPT_QUOTALL | XFS_QMOPT_INHERIT, &udqp, &gdqp); | 390 | XFS_QMOPT_QUOTALL | XFS_QMOPT_INHERIT, &udqp, &gdqp, &pdqp); |
390 | if (error) | 391 | if (error) |
391 | goto std_return; | 392 | goto std_return; |
392 | 393 | ||
@@ -427,7 +428,8 @@ xfs_symlink( | |||
427 | /* | 428 | /* |
428 | * Reserve disk quota : blocks and inode. | 429 | * Reserve disk quota : blocks and inode. |
429 | */ | 430 | */ |
430 | error = xfs_trans_reserve_quota(tp, mp, udqp, gdqp, resblks, 1, 0); | 431 | error = xfs_trans_reserve_quota(tp, mp, udqp, gdqp, |
432 | pdqp, resblks, 1, 0); | ||
431 | if (error) | 433 | if (error) |
432 | goto error_return; | 434 | goto error_return; |
433 | 435 | ||
@@ -465,7 +467,7 @@ xfs_symlink( | |||
465 | /* | 467 | /* |
466 | * Also attach the dquot(s) to it, if applicable. | 468 | * Also attach the dquot(s) to it, if applicable. |
467 | */ | 469 | */ |
468 | xfs_qm_vop_create_dqattach(tp, ip, udqp, gdqp); | 470 | xfs_qm_vop_create_dqattach(tp, ip, udqp, gdqp, pdqp); |
469 | 471 | ||
470 | if (resblks) | 472 | if (resblks) |
471 | resblks -= XFS_IALLOC_SPACE_RES(mp); | 473 | resblks -= XFS_IALLOC_SPACE_RES(mp); |
@@ -563,6 +565,7 @@ xfs_symlink( | |||
563 | error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); | 565 | error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); |
564 | xfs_qm_dqrele(udqp); | 566 | xfs_qm_dqrele(udqp); |
565 | xfs_qm_dqrele(gdqp); | 567 | xfs_qm_dqrele(gdqp); |
568 | xfs_qm_dqrele(pdqp); | ||
566 | 569 | ||
567 | *ipp = ip; | 570 | *ipp = ip; |
568 | return 0; | 571 | return 0; |
@@ -576,6 +579,7 @@ xfs_symlink( | |||
576 | xfs_trans_cancel(tp, cancel_flags); | 579 | xfs_trans_cancel(tp, cancel_flags); |
577 | xfs_qm_dqrele(udqp); | 580 | xfs_qm_dqrele(udqp); |
578 | xfs_qm_dqrele(gdqp); | 581 | xfs_qm_dqrele(gdqp); |
582 | xfs_qm_dqrele(pdqp); | ||
579 | 583 | ||
580 | if (unlock_dp_on_error) | 584 | if (unlock_dp_on_error) |
581 | xfs_iunlock(dp, XFS_ILOCK_EXCL); | 585 | xfs_iunlock(dp, XFS_ILOCK_EXCL); |