aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_vfsops.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2006-06-09 01:29:40 -0400
committerNathan Scott <nathans@sgi.com>2006-06-09 01:29:40 -0400
commitb65745205fc00d8c7722ec74e9bd955f3861c7e2 (patch)
tree524f5bacfcdf54828e97b5368eb35de938651ada /fs/xfs/xfs_vfsops.c
parent9c48876a05b6fbe41f1933fae3529c268d78cad0 (diff)
[XFS] Portability changes: remove prdev, stick to one diagnostic
interface. SGI-PV: 953338 SGI-Modid: xfs-linux-melb:xfs-kern:26103a Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_vfsops.c')
-rw-r--r--fs/xfs/xfs_vfsops.c59
1 files changed, 38 insertions, 21 deletions
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index 36ea1b2094f2..ec85a2e24b52 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -1708,42 +1708,48 @@ xfs_parseargs(
1708 1708
1709 if (!strcmp(this_char, MNTOPT_LOGBUFS)) { 1709 if (!strcmp(this_char, MNTOPT_LOGBUFS)) {
1710 if (!value || !*value) { 1710 if (!value || !*value) {
1711 printk("XFS: %s option requires an argument\n", 1711 cmn_err(CE_WARN,
1712 "XFS: %s option requires an argument",
1712 this_char); 1713 this_char);
1713 return EINVAL; 1714 return EINVAL;
1714 } 1715 }
1715 args->logbufs = simple_strtoul(value, &eov, 10); 1716 args->logbufs = simple_strtoul(value, &eov, 10);
1716 } else if (!strcmp(this_char, MNTOPT_LOGBSIZE)) { 1717 } else if (!strcmp(this_char, MNTOPT_LOGBSIZE)) {
1717 if (!value || !*value) { 1718 if (!value || !*value) {
1718 printk("XFS: %s option requires an argument\n", 1719 cmn_err(CE_WARN,
1720 "XFS: %s option requires an argument",
1719 this_char); 1721 this_char);
1720 return EINVAL; 1722 return EINVAL;
1721 } 1723 }
1722 args->logbufsize = suffix_strtoul(value, &eov, 10); 1724 args->logbufsize = suffix_strtoul(value, &eov, 10);
1723 } else if (!strcmp(this_char, MNTOPT_LOGDEV)) { 1725 } else if (!strcmp(this_char, MNTOPT_LOGDEV)) {
1724 if (!value || !*value) { 1726 if (!value || !*value) {
1725 printk("XFS: %s option requires an argument\n", 1727 cmn_err(CE_WARN,
1728 "XFS: %s option requires an argument",
1726 this_char); 1729 this_char);
1727 return EINVAL; 1730 return EINVAL;
1728 } 1731 }
1729 strncpy(args->logname, value, MAXNAMELEN); 1732 strncpy(args->logname, value, MAXNAMELEN);
1730 } else if (!strcmp(this_char, MNTOPT_MTPT)) { 1733 } else if (!strcmp(this_char, MNTOPT_MTPT)) {
1731 if (!value || !*value) { 1734 if (!value || !*value) {
1732 printk("XFS: %s option requires an argument\n", 1735 cmn_err(CE_WARN,
1736 "XFS: %s option requires an argument",
1733 this_char); 1737 this_char);
1734 return EINVAL; 1738 return EINVAL;
1735 } 1739 }
1736 strncpy(args->mtpt, value, MAXNAMELEN); 1740 strncpy(args->mtpt, value, MAXNAMELEN);
1737 } else if (!strcmp(this_char, MNTOPT_RTDEV)) { 1741 } else if (!strcmp(this_char, MNTOPT_RTDEV)) {
1738 if (!value || !*value) { 1742 if (!value || !*value) {
1739 printk("XFS: %s option requires an argument\n", 1743 cmn_err(CE_WARN,
1744 "XFS: %s option requires an argument",
1740 this_char); 1745 this_char);
1741 return EINVAL; 1746 return EINVAL;
1742 } 1747 }
1743 strncpy(args->rtname, value, MAXNAMELEN); 1748 strncpy(args->rtname, value, MAXNAMELEN);
1744 } else if (!strcmp(this_char, MNTOPT_BIOSIZE)) { 1749 } else if (!strcmp(this_char, MNTOPT_BIOSIZE)) {
1745 if (!value || !*value) { 1750 if (!value || !*value) {
1746 printk("XFS: %s option requires an argument\n", 1751 cmn_err(CE_WARN,
1752 "XFS: %s option requires an argument",
1747 this_char); 1753 this_char);
1748 return EINVAL; 1754 return EINVAL;
1749 } 1755 }
@@ -1752,7 +1758,8 @@ xfs_parseargs(
1752 args->iosizelog = (uint8_t) iosize; 1758 args->iosizelog = (uint8_t) iosize;
1753 } else if (!strcmp(this_char, MNTOPT_ALLOCSIZE)) { 1759 } else if (!strcmp(this_char, MNTOPT_ALLOCSIZE)) {
1754 if (!value || !*value) { 1760 if (!value || !*value) {
1755 printk("XFS: %s option requires an argument\n", 1761 cmn_err(CE_WARN,
1762 "XFS: %s option requires an argument",
1756 this_char); 1763 this_char);
1757 return EINVAL; 1764 return EINVAL;
1758 } 1765 }
@@ -1761,7 +1768,8 @@ xfs_parseargs(
1761 args->iosizelog = ffs(iosize) - 1; 1768 args->iosizelog = ffs(iosize) - 1;
1762 } else if (!strcmp(this_char, MNTOPT_IHASHSIZE)) { 1769 } else if (!strcmp(this_char, MNTOPT_IHASHSIZE)) {
1763 if (!value || !*value) { 1770 if (!value || !*value) {
1764 printk("XFS: %s option requires an argument\n", 1771 cmn_err(CE_WARN,
1772 "XFS: %s option requires an argument",
1765 this_char); 1773 this_char);
1766 return EINVAL; 1774 return EINVAL;
1767 } 1775 }
@@ -1782,7 +1790,8 @@ xfs_parseargs(
1782 } else if (!strcmp(this_char, MNTOPT_INO64)) { 1790 } else if (!strcmp(this_char, MNTOPT_INO64)) {
1783 args->flags |= XFSMNT_INO64; 1791 args->flags |= XFSMNT_INO64;
1784#if !XFS_BIG_INUMS 1792#if !XFS_BIG_INUMS
1785 printk("XFS: %s option not allowed on this system\n", 1793 cmn_err(CE_WARN,
1794 "XFS: %s option not allowed on this system",
1786 this_char); 1795 this_char);
1787 return EINVAL; 1796 return EINVAL;
1788#endif 1797#endif
@@ -1792,14 +1801,16 @@ xfs_parseargs(
1792 args->flags |= XFSMNT_SWALLOC; 1801 args->flags |= XFSMNT_SWALLOC;
1793 } else if (!strcmp(this_char, MNTOPT_SUNIT)) { 1802 } else if (!strcmp(this_char, MNTOPT_SUNIT)) {
1794 if (!value || !*value) { 1803 if (!value || !*value) {
1795 printk("XFS: %s option requires an argument\n", 1804 cmn_err(CE_WARN,
1805 "XFS: %s option requires an argument",
1796 this_char); 1806 this_char);
1797 return EINVAL; 1807 return EINVAL;
1798 } 1808 }
1799 dsunit = simple_strtoul(value, &eov, 10); 1809 dsunit = simple_strtoul(value, &eov, 10);
1800 } else if (!strcmp(this_char, MNTOPT_SWIDTH)) { 1810 } else if (!strcmp(this_char, MNTOPT_SWIDTH)) {
1801 if (!value || !*value) { 1811 if (!value || !*value) {
1802 printk("XFS: %s option requires an argument\n", 1812 cmn_err(CE_WARN,
1813 "XFS: %s option requires an argument",
1803 this_char); 1814 this_char);
1804 return EINVAL; 1815 return EINVAL;
1805 } 1816 }
@@ -1807,7 +1818,8 @@ xfs_parseargs(
1807 } else if (!strcmp(this_char, MNTOPT_64BITINODE)) { 1818 } else if (!strcmp(this_char, MNTOPT_64BITINODE)) {
1808 args->flags &= ~XFSMNT_32BITINODES; 1819 args->flags &= ~XFSMNT_32BITINODES;
1809#if !XFS_BIG_INUMS 1820#if !XFS_BIG_INUMS
1810 printk("XFS: %s option not allowed on this system\n", 1821 cmn_err(CE_WARN,
1822 "XFS: %s option not allowed on this system",
1811 this_char); 1823 this_char);
1812 return EINVAL; 1824 return EINVAL;
1813#endif 1825#endif
@@ -1831,36 +1843,41 @@ xfs_parseargs(
1831 args->flags &= ~XFSMNT_ATTR2; 1843 args->flags &= ~XFSMNT_ATTR2;
1832 } else if (!strcmp(this_char, "osyncisdsync")) { 1844 } else if (!strcmp(this_char, "osyncisdsync")) {
1833 /* no-op, this is now the default */ 1845 /* no-op, this is now the default */
1834printk("XFS: osyncisdsync is now the default, option is deprecated.\n"); 1846 cmn_err(CE_WARN,
1847 "XFS: osyncisdsync is now the default, option is deprecated.");
1835 } else if (!strcmp(this_char, "irixsgid")) { 1848 } else if (!strcmp(this_char, "irixsgid")) {
1836printk("XFS: irixsgid is now a sysctl(2) variable, option is deprecated.\n"); 1849 cmn_err(CE_WARN,
1850 "XFS: irixsgid is now a sysctl(2) variable, option is deprecated.");
1837 } else { 1851 } else {
1838 printk("XFS: unknown mount option [%s].\n", this_char); 1852 cmn_err(CE_WARN,
1853 "XFS: unknown mount option [%s].", this_char);
1839 return EINVAL; 1854 return EINVAL;
1840 } 1855 }
1841 } 1856 }
1842 1857
1843 if (args->flags & XFSMNT_NORECOVERY) { 1858 if (args->flags & XFSMNT_NORECOVERY) {
1844 if ((vfsp->vfs_flag & VFS_RDONLY) == 0) { 1859 if ((vfsp->vfs_flag & VFS_RDONLY) == 0) {
1845 printk("XFS: no-recovery mounts must be read-only.\n"); 1860 cmn_err(CE_WARN,
1861 "XFS: no-recovery mounts must be read-only.");
1846 return EINVAL; 1862 return EINVAL;
1847 } 1863 }
1848 } 1864 }
1849 1865
1850 if ((args->flags & XFSMNT_NOALIGN) && (dsunit || dswidth)) { 1866 if ((args->flags & XFSMNT_NOALIGN) && (dsunit || dswidth)) {
1851 printk( 1867 cmn_err(CE_WARN,
1852 "XFS: sunit and swidth options incompatible with the noalign option\n"); 1868 "XFS: sunit and swidth options incompatible with the noalign option");
1853 return EINVAL; 1869 return EINVAL;
1854 } 1870 }
1855 1871
1856 if ((dsunit && !dswidth) || (!dsunit && dswidth)) { 1872 if ((dsunit && !dswidth) || (!dsunit && dswidth)) {
1857 printk("XFS: sunit and swidth must be specified together\n"); 1873 cmn_err(CE_WARN,
1874 "XFS: sunit and swidth must be specified together");
1858 return EINVAL; 1875 return EINVAL;
1859 } 1876 }
1860 1877
1861 if (dsunit && (dswidth % dsunit != 0)) { 1878 if (dsunit && (dswidth % dsunit != 0)) {
1862 printk( 1879 cmn_err(CE_WARN,
1863 "XFS: stripe width (%d) must be a multiple of the stripe unit (%d)\n", 1880 "XFS: stripe width (%d) must be a multiple of the stripe unit (%d)",
1864 dswidth, dsunit); 1881 dswidth, dsunit);
1865 return EINVAL; 1882 return EINVAL;
1866 } 1883 }