diff options
author | Chandra Seetharaman <sekharan@us.ibm.com> | 2013-07-20 00:36:02 +0200 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-07-22 21:46:26 +0200 |
commit | d892d5864f020c44cfa4e23e9165112d8df91093 (patch) | |
tree | 84abbb176e54b24ff2a13d912d8d82a3b83710af /fs/xfs/xfs_super.c | |
parent | xfs: Initialize all quota inodes to be NULLFSINO (diff) | |
download | linux-d892d5864f020c44cfa4e23e9165112d8df91093.tar.xz linux-d892d5864f020c44cfa4e23e9165112d8df91093.zip |
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 '')
-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( } #endif - if ((mp->m_qflags & (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE)) && - (mp->m_qflags & (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE))) { - xfs_warn(mp, "cannot mount with both project and group quota"); - return EINVAL; - } - if ((dsunit && !dswidth) || (!dsunit && dswidth)) { xfs_warn(mp, "sunit and swidth must be specified together"); return EINVAL; @@ -556,14 +550,13 @@ xfs_showargs( else if (mp->m_qflags & XFS_UQUOTA_ACCT) seq_puts(m, "," MNTOPT_UQUOTANOENF); - /* Either project or group quotas can be active, not both */ - if (mp->m_qflags & XFS_PQUOTA_ACCT) { if (mp->m_qflags & XFS_PQUOTA_ENFD) seq_puts(m, "," MNTOPT_PRJQUOTA); else seq_puts(m, "," MNTOPT_PQUOTANOENF); - } else if (mp->m_qflags & XFS_GQUOTA_ACCT) { + } + if (mp->m_qflags & XFS_GQUOTA_ACCT) { if (mp->m_qflags & XFS_GQUOTA_ENFD) seq_puts(m, "," MNTOPT_GRPQUOTA); else @@ -1396,6 +1389,14 @@ xfs_finish_flags( return XFS_ERROR(EROFS); } + if ((mp->m_qflags & (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE)) && + (mp->m_qflags & (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE)) && + !xfs_sb_version_has_pquotino(&mp->m_sb)) { + xfs_warn(mp, + "Super block does not support project and group quota together"); + return XFS_ERROR(EINVAL); + } + return 0; } |