diff options
author | Chandra Seetharaman <sekharan@us.ibm.com> | 2013-07-19 18:36:02 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-07-22 15:46:26 -0400 |
commit | d892d5864f020c44cfa4e23e9165112d8df91093 (patch) | |
tree | 84abbb176e54b24ff2a13d912d8d82a3b83710af /fs/xfs/xfs_super.c | |
parent | 0102629776a2f5c3bd9c5dc0ef77956c60255074 (diff) |
xfs: Start using pquotaino from the superblock.
Start using pquotino and define a macro to check if the
superblock has pquotino.
Keep backward compatibilty by alowing mount of older superblock
with no separate pquota inode.
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_super.c')
-rw-r--r-- | fs/xfs/xfs_super.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 1d68ffcdeaa7..525524e43f22 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c | |||
@@ -421,12 +421,6 @@ xfs_parseargs( | |||
421 | } | 421 | } |
422 | #endif | 422 | #endif |
423 | 423 | ||
424 | if ((mp->m_qflags & (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE)) && | ||
425 | (mp->m_qflags & (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE))) { | ||
426 | xfs_warn(mp, "cannot mount with both project and group quota"); | ||
427 | return EINVAL; | ||
428 | } | ||
429 | |||
430 | if ((dsunit && !dswidth) || (!dsunit && dswidth)) { | 424 | if ((dsunit && !dswidth) || (!dsunit && dswidth)) { |
431 | xfs_warn(mp, "sunit and swidth must be specified together"); | 425 | xfs_warn(mp, "sunit and swidth must be specified together"); |
432 | return EINVAL; | 426 | return EINVAL; |
@@ -556,14 +550,13 @@ xfs_showargs( | |||
556 | else if (mp->m_qflags & XFS_UQUOTA_ACCT) | 550 | else if (mp->m_qflags & XFS_UQUOTA_ACCT) |
557 | seq_puts(m, "," MNTOPT_UQUOTANOENF); | 551 | seq_puts(m, "," MNTOPT_UQUOTANOENF); |
558 | 552 | ||
559 | /* Either project or group quotas can be active, not both */ | ||
560 | |||
561 | if (mp->m_qflags & XFS_PQUOTA_ACCT) { | 553 | if (mp->m_qflags & XFS_PQUOTA_ACCT) { |
562 | if (mp->m_qflags & XFS_PQUOTA_ENFD) | 554 | if (mp->m_qflags & XFS_PQUOTA_ENFD) |
563 | seq_puts(m, "," MNTOPT_PRJQUOTA); | 555 | seq_puts(m, "," MNTOPT_PRJQUOTA); |
564 | else | 556 | else |
565 | seq_puts(m, "," MNTOPT_PQUOTANOENF); | 557 | seq_puts(m, "," MNTOPT_PQUOTANOENF); |
566 | } else if (mp->m_qflags & XFS_GQUOTA_ACCT) { | 558 | } |
559 | if (mp->m_qflags & XFS_GQUOTA_ACCT) { | ||
567 | if (mp->m_qflags & XFS_GQUOTA_ENFD) | 560 | if (mp->m_qflags & XFS_GQUOTA_ENFD) |
568 | seq_puts(m, "," MNTOPT_GRPQUOTA); | 561 | seq_puts(m, "," MNTOPT_GRPQUOTA); |
569 | else | 562 | else |
@@ -1396,6 +1389,14 @@ xfs_finish_flags( | |||
1396 | return XFS_ERROR(EROFS); | 1389 | return XFS_ERROR(EROFS); |
1397 | } | 1390 | } |
1398 | 1391 | ||
1392 | if ((mp->m_qflags & (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE)) && | ||
1393 | (mp->m_qflags & (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE)) && | ||
1394 | !xfs_sb_version_has_pquotino(&mp->m_sb)) { | ||
1395 | xfs_warn(mp, | ||
1396 | "Super block does not support project and group quota together"); | ||
1397 | return XFS_ERROR(EINVAL); | ||
1398 | } | ||
1399 | |||
1399 | return 0; | 1400 | return 0; |
1400 | } | 1401 | } |
1401 | 1402 | ||