aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_vfsops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_vfsops.c')
-rw-r--r--fs/xfs/xfs_vfsops.c70
1 files changed, 35 insertions, 35 deletions
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index 871a1747706b..aa310875c88c 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -1806,15 +1806,17 @@ done:
1806 return 0; 1806 return 0;
1807} 1807}
1808 1808
1809struct proc_xfs_info {
1810 int flag;
1811 char *str;
1812};
1813
1809int 1814int
1810xfs_showargs( 1815xfs_showargs(
1811 struct xfs_mount *mp, 1816 struct xfs_mount *mp,
1812 struct seq_file *m) 1817 struct seq_file *m)
1813{ 1818{
1814 static struct proc_xfs_info { 1819 static struct proc_xfs_info xfs_info_set[] = {
1815 int flag;
1816 char *str;
1817 } xfs_info[] = {
1818 /* the few simple ones we can get from the mount struct */ 1820 /* the few simple ones we can get from the mount struct */
1819 { XFS_MOUNT_WSYNC, "," MNTOPT_WSYNC }, 1821 { XFS_MOUNT_WSYNC, "," MNTOPT_WSYNC },
1820 { XFS_MOUNT_INO64, "," MNTOPT_INO64 }, 1822 { XFS_MOUNT_INO64, "," MNTOPT_INO64 },
@@ -1823,14 +1825,30 @@ xfs_showargs(
1823 { XFS_MOUNT_NOUUID, "," MNTOPT_NOUUID }, 1825 { XFS_MOUNT_NOUUID, "," MNTOPT_NOUUID },
1824 { XFS_MOUNT_NORECOVERY, "," MNTOPT_NORECOVERY }, 1826 { XFS_MOUNT_NORECOVERY, "," MNTOPT_NORECOVERY },
1825 { XFS_MOUNT_OSYNCISOSYNC, "," MNTOPT_OSYNCISOSYNC }, 1827 { XFS_MOUNT_OSYNCISOSYNC, "," MNTOPT_OSYNCISOSYNC },
1828 { XFS_MOUNT_ATTR2, "," MNTOPT_ATTR2 },
1829 { XFS_MOUNT_FILESTREAMS, "," MNTOPT_FILESTREAM },
1830 { XFS_MOUNT_DMAPI, "," MNTOPT_DMAPI },
1831 { XFS_MOUNT_GRPID, "," MNTOPT_GRPID },
1832 { 0, NULL }
1833 };
1834 static struct proc_xfs_info xfs_info_unset[] = {
1835 /* the few simple ones we can get from the mount struct */
1836 { XFS_MOUNT_IDELETE, "," MNTOPT_IKEEP },
1837 { XFS_MOUNT_COMPAT_IOSIZE, "," MNTOPT_LARGEIO },
1838 { XFS_MOUNT_BARRIER, "," MNTOPT_NOBARRIER },
1839 { XFS_MOUNT_SMALL_INUMS, "," MNTOPT_64BITINODE },
1826 { 0, NULL } 1840 { 0, NULL }
1827 }; 1841 };
1828 struct proc_xfs_info *xfs_infop; 1842 struct proc_xfs_info *xfs_infop;
1829 1843
1830 for (xfs_infop = xfs_info; xfs_infop->flag; xfs_infop++) { 1844 for (xfs_infop = xfs_info_set; xfs_infop->flag; xfs_infop++) {
1831 if (mp->m_flags & xfs_infop->flag) 1845 if (mp->m_flags & xfs_infop->flag)
1832 seq_puts(m, xfs_infop->str); 1846 seq_puts(m, xfs_infop->str);
1833 } 1847 }
1848 for (xfs_infop = xfs_info_unset; xfs_infop->flag; xfs_infop++) {
1849 if (!(mp->m_flags & xfs_infop->flag))
1850 seq_puts(m, xfs_infop->str);
1851 }
1834 1852
1835 if (mp->m_flags & XFS_MOUNT_DFLT_IOSIZE) 1853 if (mp->m_flags & XFS_MOUNT_DFLT_IOSIZE)
1836 seq_printf(m, "," MNTOPT_ALLOCSIZE "=%dk", 1854 seq_printf(m, "," MNTOPT_ALLOCSIZE "=%dk",
@@ -1853,41 +1871,23 @@ xfs_showargs(
1853 seq_printf(m, "," MNTOPT_SWIDTH "=%d", 1871 seq_printf(m, "," MNTOPT_SWIDTH "=%d",
1854 (int)XFS_FSB_TO_BB(mp, mp->m_swidth)); 1872 (int)XFS_FSB_TO_BB(mp, mp->m_swidth));
1855 1873
1856 if (!(mp->m_flags & XFS_MOUNT_IDELETE)) 1874 if (mp->m_qflags & (XFS_UQUOTA_ACCT|XFS_UQUOTA_ENFD))
1857 seq_printf(m, "," MNTOPT_IKEEP); 1875 seq_puts(m, "," MNTOPT_USRQUOTA);
1858 if (!(mp->m_flags & XFS_MOUNT_COMPAT_IOSIZE)) 1876 else if (mp->m_qflags & XFS_UQUOTA_ACCT)
1859 seq_printf(m, "," MNTOPT_LARGEIO); 1877 seq_puts(m, "," MNTOPT_UQUOTANOENF);
1860
1861 if (!(mp->m_flags & XFS_MOUNT_SMALL_INUMS))
1862 seq_printf(m, "," MNTOPT_64BITINODE);
1863 if (mp->m_flags & XFS_MOUNT_GRPID)
1864 seq_printf(m, "," MNTOPT_GRPID);
1865 1878
1866 if (mp->m_qflags & XFS_UQUOTA_ACCT) { 1879 if (mp->m_qflags & (XFS_PQUOTA_ACCT|XFS_OQUOTA_ENFD))
1867 if (mp->m_qflags & XFS_UQUOTA_ENFD) 1880 seq_puts(m, "," MNTOPT_PRJQUOTA);
1868 seq_puts(m, "," MNTOPT_USRQUOTA); 1881 else if (mp->m_qflags & XFS_PQUOTA_ACCT)
1869 else 1882 seq_puts(m, "," MNTOPT_PQUOTANOENF);
1870 seq_puts(m, "," MNTOPT_UQUOTANOENF);
1871 }
1872 1883
1873 if (mp->m_qflags & XFS_PQUOTA_ACCT) { 1884 if (mp->m_qflags & (XFS_GQUOTA_ACCT|XFS_OQUOTA_ENFD))
1874 if (mp->m_qflags & XFS_OQUOTA_ENFD) 1885 seq_puts(m, "," MNTOPT_GRPQUOTA);
1875 seq_puts(m, "," MNTOPT_PRJQUOTA); 1886 else if (mp->m_qflags & XFS_GQUOTA_ACCT)
1876 else 1887 seq_puts(m, "," MNTOPT_GQUOTANOENF);
1877 seq_puts(m, "," MNTOPT_PQUOTANOENF);
1878 }
1879
1880 if (mp->m_qflags & XFS_GQUOTA_ACCT) {
1881 if (mp->m_qflags & XFS_OQUOTA_ENFD)
1882 seq_puts(m, "," MNTOPT_GRPQUOTA);
1883 else
1884 seq_puts(m, "," MNTOPT_GQUOTANOENF);
1885 }
1886 1888
1887 if (!(mp->m_qflags & XFS_ALL_QUOTA_ACCT)) 1889 if (!(mp->m_qflags & XFS_ALL_QUOTA_ACCT))
1888 seq_puts(m, "," MNTOPT_NOQUOTA); 1890 seq_puts(m, "," MNTOPT_NOQUOTA);
1889 1891
1890 if (mp->m_flags & XFS_MOUNT_DMAPI)
1891 seq_puts(m, "," MNTOPT_DMAPI);
1892 return 0; 1892 return 0;
1893} 1893}