android_kernel_samsung_msm8976/fs/xfs
Alex Elder 988abe4075 xfs: xfs_showargs() reports group *and* project quotas enabled
If you enable group or project quotas on an XFS file system, then the
mount table presented through /proc/self/mounts erroneously shows
that both options are in effect for the file system.  The root of
the problem is some bad logic in the xfs_showargs() function, which
is used to format the file system type-specific options in effect
for a file system.

The problem originated in this GIT commit:
    Move platform specific mount option parse out of core XFS code
    Date: 11/22/07
    Author: Dave Chinner
    SHA1 ID: a67d7c5f5d

For XFS quotas, project and group quota management are mutually
exclusive--only one can be in effect at a time.  There are two
parts to managing quotas:  aggregating usage information; and
enforcing limits.  It is possible to have a quota in effect
(aggregating usage) but not enforced.

These features are recorded on an XFS mount point using these flags:
    XFS_PQUOTA_ACCT - Project quotas are aggregated
    XFS_GQUOTA_ACCT - Group quotas are aggregated
    XFS_OQUOTA_ENFD - Project/group quotas are enforced

The code in error is in fs/xfs/linux-2.6/xfs_super.c:

        if (mp->m_qflags & (XFS_PQUOTA_ACCT|XFS_OQUOTA_ENFD))
                seq_puts(m, "," MNTOPT_PRJQUOTA);
        else if (mp->m_qflags & XFS_PQUOTA_ACCT)
                seq_puts(m, "," MNTOPT_PQUOTANOENF);

        if (mp->m_qflags & (XFS_GQUOTA_ACCT|XFS_OQUOTA_ENFD))
                seq_puts(m, "," MNTOPT_GRPQUOTA);
        else if (mp->m_qflags & XFS_GQUOTA_ACCT)
                seq_puts(m, "," MNTOPT_GQUOTANOENF);

The problem is that XFS_OQUOTA_ENFD will be set in mp->m_qflags
if either group or project quotas are enforced, and as a result
both MNTOPT_PRJQUOTA and MNTOPT_GRPQUOTA will be shown as mount
options.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
2009-09-02 17:02:24 -05:00
..
linux-2.6 xfs: xfs_showargs() reports group *and* project quotas enabled 2009-09-02 17:02:24 -05:00
quota xfs: use generic Posix ACL code 2009-06-10 17:07:47 +02:00
support
Kconfig xfs: use generic Posix ACL code 2009-06-10 17:07:47 +02:00
Makefile xfs: use generic Posix ACL code 2009-06-10 17:07:47 +02:00
xfs.h
xfs_acl.h switch xfs to generic acl caching helpers 2009-06-24 08:17:07 -04:00
xfs_ag.h xfs: speed up free inode search 2009-09-01 12:45:48 -05:00
xfs_alloc.c un-static xfs_read_agf 2009-08-31 14:46:21 -05:00
xfs_alloc.h
xfs_alloc_btree.c
xfs_alloc_btree.h
xfs_arch.h xfs: use generic Posix ACL code 2009-06-10 17:07:47 +02:00
xfs_attr.c xfs: switch to NOFS allocation under i_lock in xfs_attr_rmtval_get 2009-08-12 01:08:01 -05:00
xfs_attr.h
xfs_attr_leaf.c
xfs_attr_leaf.h
xfs_attr_sf.h
xfs_bit.c
xfs_bit.h
xfs_bmap.c xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_bmap.h xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_bmap_btree.c xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_bmap_btree.h xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_btree.c xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_btree.h xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_btree_trace.c
xfs_btree_trace.h
xfs_buf_item.c
xfs_buf_item.h
xfs_da_btree.c xfs: switch to NOFS allocation under i_lock in xfs_da_buf_make 2009-08-12 01:07:14 -05:00
xfs_da_btree.h
xfs_dfrag.c xfs: fix double unlock in xfs_swap_extents() 2009-06-01 22:59:29 -05:00
xfs_dfrag.h
xfs_dinode.h
xfs_dir2.c xfs: switch to NOFS allocation under i_lock in xfs_dir_cilookup_result 2009-08-12 01:07:23 -05:00
xfs_dir2.h
xfs_dir2_block.c
xfs_dir2_block.h
xfs_dir2_data.c
xfs_dir2_data.h
xfs_dir2_leaf.c
xfs_dir2_leaf.h
xfs_dir2_node.c
xfs_dir2_node.h
xfs_dir2_sf.c
xfs_dir2_sf.h
xfs_dir2_trace.c
xfs_dir2_trace.h
xfs_dmapi.h
xfs_dmops.c
xfs_error.c
xfs_error.h
xfs_extfree_item.c
xfs_extfree_item.h
xfs_filestream.c xfs: split xfs_sync_inodes 2009-06-08 15:35:48 +02:00
xfs_filestream.h
xfs_fs.h xfs: update max log size 2009-06-08 15:32:59 +02:00
xfs_fsops.c xfs: avoid memory allocation under m_peraglock in growfs code 2009-08-12 01:06:51 -05:00
xfs_fsops.h
xfs_ialloc.c xfs: un-static xfs_inobt_lookup 2009-09-01 20:43:01 -05:00
xfs_ialloc.h xfs: rationalize xfs_inobt_lookup* 2009-09-01 12:45:39 -05:00
xfs_ialloc_btree.c
xfs_ialloc_btree.h
xfs_iget.c xfs: simplify xfs_trans_iget 2009-09-01 12:46:16 -05:00
xfs_inode.c xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_inode.h xfs: simplify xfs_trans_iget 2009-09-01 12:46:16 -05:00
xfs_inode_item.c xfs: simplify xfs_trans_iget 2009-09-01 12:46:16 -05:00
xfs_inode_item.h xfs: simplify xfs_trans_iget 2009-09-01 12:46:16 -05:00
xfs_inum.h xfs: remove XFS_INO64_OFFSET 2009-08-31 14:46:22 -05:00
xfs_iomap.c xfs: use generic Posix ACL code 2009-06-10 17:07:47 +02:00
xfs_iomap.h
xfs_itable.c xfs: rationalize xfs_inobt_lookup* 2009-09-01 12:45:39 -05:00
xfs_itable.h xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_log.c xfs: fix spin_is_locked assert on uni-processor builds 2009-08-12 01:08:27 -05:00
xfs_log.h
xfs_log_priv.h xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_log_recover.c xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_log_recover.h
xfs_mount.c xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_mount.h xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_mru_cache.c xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_mru_cache.h xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_quota.h xfs: fix warnings with CONFIG_XFS_QUOTA disabled 2009-06-12 21:15:12 -05:00
xfs_refcache.h
xfs_rename.c xfs: kill xfs_qmops 2009-06-08 15:33:32 +02:00
xfs_rtalloc.c
xfs_rtalloc.h
xfs_rw.c xfs: merge fsync and O_SYNC handling 2009-09-01 12:45:57 -05:00
xfs_rw.h xfs: merge fsync and O_SYNC handling 2009-09-01 12:45:57 -05:00
xfs_sb.h
xfs_trans.c Merge branch 'master' of git://oss.sgi.com/xfs/xfs into for-linus 2009-06-12 21:28:59 -05:00
xfs_trans.h xfs: merge fsync and O_SYNC handling 2009-09-01 12:45:57 -05:00
xfs_trans_ail.c
xfs_trans_buf.c fs/xfs: Correct redundant test 2009-08-31 14:46:22 -05:00
xfs_trans_extfree.c
xfs_trans_inode.c xfs: simplify xfs_trans_iget 2009-09-01 12:46:16 -05:00
xfs_trans_item.c
xfs_trans_priv.h
xfs_trans_space.h
xfs_types.h
xfs_utils.c xfs: kill xfs_qmops 2009-06-08 15:33:32 +02:00
xfs_utils.h
xfs_vnodeops.c xfs: merge fsync and O_SYNC handling 2009-09-01 12:45:57 -05:00
xfs_vnodeops.h xfs: use generic Posix ACL code 2009-06-10 17:07:47 +02:00