diff options
Diffstat (limited to 'fs/xfs/xfs_vfsops.c')
-rw-r--r-- | fs/xfs/xfs_vfsops.c | 122 |
1 files changed, 64 insertions, 58 deletions
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c index 36ea1b2094f2..6c96391f3f1a 100644 --- a/fs/xfs/xfs_vfsops.c +++ b/fs/xfs/xfs_vfsops.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include "xfs_trans.h" | 24 | #include "xfs_trans.h" |
25 | #include "xfs_sb.h" | 25 | #include "xfs_sb.h" |
26 | #include "xfs_ag.h" | 26 | #include "xfs_ag.h" |
27 | #include "xfs_dir.h" | ||
28 | #include "xfs_dir2.h" | 27 | #include "xfs_dir2.h" |
29 | #include "xfs_dmapi.h" | 28 | #include "xfs_dmapi.h" |
30 | #include "xfs_mount.h" | 29 | #include "xfs_mount.h" |
@@ -32,7 +31,6 @@ | |||
32 | #include "xfs_bmap_btree.h" | 31 | #include "xfs_bmap_btree.h" |
33 | #include "xfs_ialloc_btree.h" | 32 | #include "xfs_ialloc_btree.h" |
34 | #include "xfs_alloc_btree.h" | 33 | #include "xfs_alloc_btree.h" |
35 | #include "xfs_dir_sf.h" | ||
36 | #include "xfs_dir2_sf.h" | 34 | #include "xfs_dir2_sf.h" |
37 | #include "xfs_attr_sf.h" | 35 | #include "xfs_attr_sf.h" |
38 | #include "xfs_dinode.h" | 36 | #include "xfs_dinode.h" |
@@ -131,9 +129,6 @@ xfs_init(void) | |||
131 | #ifdef XFS_BMBT_TRACE | 129 | #ifdef XFS_BMBT_TRACE |
132 | xfs_bmbt_trace_buf = ktrace_alloc(XFS_BMBT_TRACE_SIZE, KM_SLEEP); | 130 | xfs_bmbt_trace_buf = ktrace_alloc(XFS_BMBT_TRACE_SIZE, KM_SLEEP); |
133 | #endif | 131 | #endif |
134 | #ifdef XFS_DIR_TRACE | ||
135 | xfs_dir_trace_buf = ktrace_alloc(XFS_DIR_TRACE_SIZE, KM_SLEEP); | ||
136 | #endif | ||
137 | #ifdef XFS_ATTR_TRACE | 132 | #ifdef XFS_ATTR_TRACE |
138 | xfs_attr_trace_buf = ktrace_alloc(XFS_ATTR_TRACE_SIZE, KM_SLEEP); | 133 | xfs_attr_trace_buf = ktrace_alloc(XFS_ATTR_TRACE_SIZE, KM_SLEEP); |
139 | #endif | 134 | #endif |
@@ -177,9 +172,6 @@ xfs_cleanup(void) | |||
177 | #ifdef XFS_ATTR_TRACE | 172 | #ifdef XFS_ATTR_TRACE |
178 | ktrace_free(xfs_attr_trace_buf); | 173 | ktrace_free(xfs_attr_trace_buf); |
179 | #endif | 174 | #endif |
180 | #ifdef XFS_DIR_TRACE | ||
181 | ktrace_free(xfs_dir_trace_buf); | ||
182 | #endif | ||
183 | #ifdef XFS_BMBT_TRACE | 175 | #ifdef XFS_BMBT_TRACE |
184 | ktrace_free(xfs_bmbt_trace_buf); | 176 | ktrace_free(xfs_bmbt_trace_buf); |
185 | #endif | 177 | #endif |
@@ -212,7 +204,7 @@ xfs_cleanup(void) | |||
212 | */ | 204 | */ |
213 | STATIC int | 205 | STATIC int |
214 | xfs_start_flags( | 206 | xfs_start_flags( |
215 | struct vfs *vfs, | 207 | struct bhv_vfs *vfs, |
216 | struct xfs_mount_args *ap, | 208 | struct xfs_mount_args *ap, |
217 | struct xfs_mount *mp) | 209 | struct xfs_mount *mp) |
218 | { | 210 | { |
@@ -337,7 +329,7 @@ xfs_start_flags( | |||
337 | */ | 329 | */ |
338 | STATIC int | 330 | STATIC int |
339 | xfs_finish_flags( | 331 | xfs_finish_flags( |
340 | struct vfs *vfs, | 332 | struct bhv_vfs *vfs, |
341 | struct xfs_mount_args *ap, | 333 | struct xfs_mount_args *ap, |
342 | struct xfs_mount *mp) | 334 | struct xfs_mount *mp) |
343 | { | 335 | { |
@@ -423,7 +415,7 @@ xfs_mount( | |||
423 | struct xfs_mount_args *args, | 415 | struct xfs_mount_args *args, |
424 | cred_t *credp) | 416 | cred_t *credp) |
425 | { | 417 | { |
426 | struct vfs *vfsp = bhvtovfs(bhvp); | 418 | struct bhv_vfs *vfsp = bhvtovfs(bhvp); |
427 | struct bhv_desc *p; | 419 | struct bhv_desc *p; |
428 | struct xfs_mount *mp = XFS_BHVTOM(bhvp); | 420 | struct xfs_mount *mp = XFS_BHVTOM(bhvp); |
429 | struct block_device *ddev, *logdev, *rtdev; | 421 | struct block_device *ddev, *logdev, *rtdev; |
@@ -552,10 +544,10 @@ xfs_unmount( | |||
552 | int flags, | 544 | int flags, |
553 | cred_t *credp) | 545 | cred_t *credp) |
554 | { | 546 | { |
555 | struct vfs *vfsp = bhvtovfs(bdp); | 547 | bhv_vfs_t *vfsp = bhvtovfs(bdp); |
556 | xfs_mount_t *mp = XFS_BHVTOM(bdp); | 548 | xfs_mount_t *mp = XFS_BHVTOM(bdp); |
557 | xfs_inode_t *rip; | 549 | xfs_inode_t *rip; |
558 | vnode_t *rvp; | 550 | bhv_vnode_t *rvp; |
559 | int unmount_event_wanted = 0; | 551 | int unmount_event_wanted = 0; |
560 | int unmount_event_flags = 0; | 552 | int unmount_event_flags = 0; |
561 | int xfs_unmountfs_needed = 0; | 553 | int xfs_unmountfs_needed = 0; |
@@ -665,9 +657,8 @@ xfs_mntupdate( | |||
665 | int *flags, | 657 | int *flags, |
666 | struct xfs_mount_args *args) | 658 | struct xfs_mount_args *args) |
667 | { | 659 | { |
668 | struct vfs *vfsp = bhvtovfs(bdp); | 660 | bhv_vfs_t *vfsp = bhvtovfs(bdp); |
669 | xfs_mount_t *mp = XFS_BHVTOM(bdp); | 661 | xfs_mount_t *mp = XFS_BHVTOM(bdp); |
670 | int error; | ||
671 | 662 | ||
672 | if (!(*flags & MS_RDONLY)) { /* rw/ro -> rw */ | 663 | if (!(*flags & MS_RDONLY)) { /* rw/ro -> rw */ |
673 | if (vfsp->vfs_flag & VFS_RDONLY) | 664 | if (vfsp->vfs_flag & VFS_RDONLY) |
@@ -679,7 +670,7 @@ xfs_mntupdate( | |||
679 | mp->m_flags &= ~XFS_MOUNT_BARRIER; | 670 | mp->m_flags &= ~XFS_MOUNT_BARRIER; |
680 | } | 671 | } |
681 | } else if (!(vfsp->vfs_flag & VFS_RDONLY)) { /* rw -> ro */ | 672 | } else if (!(vfsp->vfs_flag & VFS_RDONLY)) { /* rw -> ro */ |
682 | VFS_SYNC(vfsp, SYNC_FSDATA|SYNC_BDFLUSH|SYNC_ATTR, NULL, error); | 673 | bhv_vfs_sync(vfsp, SYNC_FSDATA|SYNC_BDFLUSH|SYNC_ATTR, NULL); |
683 | xfs_quiesce_fs(mp); | 674 | xfs_quiesce_fs(mp); |
684 | xfs_log_unmount_write(mp); | 675 | xfs_log_unmount_write(mp); |
685 | xfs_unmountfs_writesb(mp); | 676 | xfs_unmountfs_writesb(mp); |
@@ -702,7 +693,7 @@ xfs_unmount_flush( | |||
702 | xfs_inode_t *rip = mp->m_rootip; | 693 | xfs_inode_t *rip = mp->m_rootip; |
703 | xfs_inode_t *rbmip; | 694 | xfs_inode_t *rbmip; |
704 | xfs_inode_t *rsumip = NULL; | 695 | xfs_inode_t *rsumip = NULL; |
705 | vnode_t *rvp = XFS_ITOV(rip); | 696 | bhv_vnode_t *rvp = XFS_ITOV(rip); |
706 | int error; | 697 | int error; |
707 | 698 | ||
708 | xfs_ilock(rip, XFS_ILOCK_EXCL); | 699 | xfs_ilock(rip, XFS_ILOCK_EXCL); |
@@ -781,9 +772,9 @@ fscorrupt_out2: | |||
781 | STATIC int | 772 | STATIC int |
782 | xfs_root( | 773 | xfs_root( |
783 | bhv_desc_t *bdp, | 774 | bhv_desc_t *bdp, |
784 | vnode_t **vpp) | 775 | bhv_vnode_t **vpp) |
785 | { | 776 | { |
786 | vnode_t *vp; | 777 | bhv_vnode_t *vp; |
787 | 778 | ||
788 | vp = XFS_ITOV((XFS_BHVTOM(bdp))->m_rootip); | 779 | vp = XFS_ITOV((XFS_BHVTOM(bdp))->m_rootip); |
789 | VN_HOLD(vp); | 780 | VN_HOLD(vp); |
@@ -801,8 +792,8 @@ xfs_root( | |||
801 | STATIC int | 792 | STATIC int |
802 | xfs_statvfs( | 793 | xfs_statvfs( |
803 | bhv_desc_t *bdp, | 794 | bhv_desc_t *bdp, |
804 | xfs_statfs_t *statp, | 795 | bhv_statvfs_t *statp, |
805 | vnode_t *vp) | 796 | bhv_vnode_t *vp) |
806 | { | 797 | { |
807 | __uint64_t fakeinos; | 798 | __uint64_t fakeinos; |
808 | xfs_extlen_t lsize; | 799 | xfs_extlen_t lsize; |
@@ -900,7 +891,7 @@ xfs_sync( | |||
900 | /* | 891 | /* |
901 | * xfs sync routine for internal use | 892 | * xfs sync routine for internal use |
902 | * | 893 | * |
903 | * This routine supports all of the flags defined for the generic VFS_SYNC | 894 | * This routine supports all of the flags defined for the generic vfs_sync |
904 | * interface as explained above under xfs_sync. In the interests of not | 895 | * interface as explained above under xfs_sync. In the interests of not |
905 | * changing interfaces within the 6.5 family, additional internally- | 896 | * changing interfaces within the 6.5 family, additional internally- |
906 | * required functions are specified within a separate xflags parameter, | 897 | * required functions are specified within a separate xflags parameter, |
@@ -917,7 +908,7 @@ xfs_sync_inodes( | |||
917 | xfs_inode_t *ip = NULL; | 908 | xfs_inode_t *ip = NULL; |
918 | xfs_inode_t *ip_next; | 909 | xfs_inode_t *ip_next; |
919 | xfs_buf_t *bp; | 910 | xfs_buf_t *bp; |
920 | vnode_t *vp = NULL; | 911 | bhv_vnode_t *vp = NULL; |
921 | int error; | 912 | int error; |
922 | int last_error; | 913 | int last_error; |
923 | uint64_t fflag; | 914 | uint64_t fflag; |
@@ -1156,9 +1147,9 @@ xfs_sync_inodes( | |||
1156 | xfs_iunlock(ip, XFS_ILOCK_SHARED); | 1147 | xfs_iunlock(ip, XFS_ILOCK_SHARED); |
1157 | 1148 | ||
1158 | if (XFS_FORCED_SHUTDOWN(mp)) { | 1149 | if (XFS_FORCED_SHUTDOWN(mp)) { |
1159 | VOP_TOSS_PAGES(vp, 0, -1, FI_REMAPF); | 1150 | bhv_vop_toss_pages(vp, 0, -1, FI_REMAPF); |
1160 | } else { | 1151 | } else { |
1161 | VOP_FLUSHINVAL_PAGES(vp, 0, -1, FI_REMAPF); | 1152 | bhv_vop_flushinval_pages(vp, 0, -1, FI_REMAPF); |
1162 | } | 1153 | } |
1163 | 1154 | ||
1164 | xfs_ilock(ip, XFS_ILOCK_SHARED); | 1155 | xfs_ilock(ip, XFS_ILOCK_SHARED); |
@@ -1178,8 +1169,8 @@ xfs_sync_inodes( | |||
1178 | * across calls to the buffer cache. | 1169 | * across calls to the buffer cache. |
1179 | */ | 1170 | */ |
1180 | xfs_iunlock(ip, XFS_ILOCK_SHARED); | 1171 | xfs_iunlock(ip, XFS_ILOCK_SHARED); |
1181 | VOP_FLUSH_PAGES(vp, (xfs_off_t)0, -1, | 1172 | error = bhv_vop_flush_pages(vp, (xfs_off_t)0, |
1182 | fflag, FI_NONE, error); | 1173 | -1, fflag, FI_NONE); |
1183 | xfs_ilock(ip, XFS_ILOCK_SHARED); | 1174 | xfs_ilock(ip, XFS_ILOCK_SHARED); |
1184 | } | 1175 | } |
1185 | 1176 | ||
@@ -1231,9 +1222,7 @@ xfs_sync_inodes( | |||
1231 | * marker and free it. | 1222 | * marker and free it. |
1232 | */ | 1223 | */ |
1233 | XFS_MOUNT_ILOCK(mp); | 1224 | XFS_MOUNT_ILOCK(mp); |
1234 | |||
1235 | IPOINTER_REMOVE(ip, mp); | 1225 | IPOINTER_REMOVE(ip, mp); |
1236 | |||
1237 | XFS_MOUNT_IUNLOCK(mp); | 1226 | XFS_MOUNT_IUNLOCK(mp); |
1238 | 1227 | ||
1239 | ASSERT(!(lock_flags & | 1228 | ASSERT(!(lock_flags & |
@@ -1421,7 +1410,7 @@ xfs_sync_inodes( | |||
1421 | /* | 1410 | /* |
1422 | * xfs sync routine for internal use | 1411 | * xfs sync routine for internal use |
1423 | * | 1412 | * |
1424 | * This routine supports all of the flags defined for the generic VFS_SYNC | 1413 | * This routine supports all of the flags defined for the generic vfs_sync |
1425 | * interface as explained above under xfs_sync. In the interests of not | 1414 | * interface as explained above under xfs_sync. In the interests of not |
1426 | * changing interfaces within the 6.5 family, additional internally- | 1415 | * changing interfaces within the 6.5 family, additional internally- |
1427 | * required functions are specified within a separate xflags parameter, | 1416 | * required functions are specified within a separate xflags parameter, |
@@ -1574,7 +1563,7 @@ xfs_syncsub( | |||
1574 | STATIC int | 1563 | STATIC int |
1575 | xfs_vget( | 1564 | xfs_vget( |
1576 | bhv_desc_t *bdp, | 1565 | bhv_desc_t *bdp, |
1577 | vnode_t **vpp, | 1566 | bhv_vnode_t **vpp, |
1578 | fid_t *fidp) | 1567 | fid_t *fidp) |
1579 | { | 1568 | { |
1580 | xfs_mount_t *mp = XFS_BHVTOM(bdp); | 1569 | xfs_mount_t *mp = XFS_BHVTOM(bdp); |
@@ -1657,10 +1646,10 @@ xfs_vget( | |||
1657 | #define MNTOPT_NOATTR2 "noattr2" /* do not use attr2 attribute format */ | 1646 | #define MNTOPT_NOATTR2 "noattr2" /* do not use attr2 attribute format */ |
1658 | 1647 | ||
1659 | STATIC unsigned long | 1648 | STATIC unsigned long |
1660 | suffix_strtoul(const char *cp, char **endp, unsigned int base) | 1649 | suffix_strtoul(char *s, char **endp, unsigned int base) |
1661 | { | 1650 | { |
1662 | int last, shift_left_factor = 0; | 1651 | int last, shift_left_factor = 0; |
1663 | char *value = (char *)cp; | 1652 | char *value = s; |
1664 | 1653 | ||
1665 | last = strlen(value) - 1; | 1654 | last = strlen(value) - 1; |
1666 | if (value[last] == 'K' || value[last] == 'k') { | 1655 | if (value[last] == 'K' || value[last] == 'k') { |
@@ -1676,7 +1665,7 @@ suffix_strtoul(const char *cp, char **endp, unsigned int base) | |||
1676 | value[last] = '\0'; | 1665 | value[last] = '\0'; |
1677 | } | 1666 | } |
1678 | 1667 | ||
1679 | return simple_strtoul(cp, endp, base) << shift_left_factor; | 1668 | return simple_strtoul((const char *)s, endp, base) << shift_left_factor; |
1680 | } | 1669 | } |
1681 | 1670 | ||
1682 | STATIC int | 1671 | STATIC int |
@@ -1686,7 +1675,7 @@ xfs_parseargs( | |||
1686 | struct xfs_mount_args *args, | 1675 | struct xfs_mount_args *args, |
1687 | int update) | 1676 | int update) |
1688 | { | 1677 | { |
1689 | struct vfs *vfsp = bhvtovfs(bhv); | 1678 | bhv_vfs_t *vfsp = bhvtovfs(bhv); |
1690 | char *this_char, *value, *eov; | 1679 | char *this_char, *value, *eov; |
1691 | int dsunit, dswidth, vol_dsunit, vol_dswidth; | 1680 | int dsunit, dswidth, vol_dsunit, vol_dswidth; |
1692 | int iosize; | 1681 | int iosize; |
@@ -1708,42 +1697,48 @@ xfs_parseargs( | |||
1708 | 1697 | ||
1709 | if (!strcmp(this_char, MNTOPT_LOGBUFS)) { | 1698 | if (!strcmp(this_char, MNTOPT_LOGBUFS)) { |
1710 | if (!value || !*value) { | 1699 | if (!value || !*value) { |
1711 | printk("XFS: %s option requires an argument\n", | 1700 | cmn_err(CE_WARN, |
1701 | "XFS: %s option requires an argument", | ||
1712 | this_char); | 1702 | this_char); |
1713 | return EINVAL; | 1703 | return EINVAL; |
1714 | } | 1704 | } |
1715 | args->logbufs = simple_strtoul(value, &eov, 10); | 1705 | args->logbufs = simple_strtoul(value, &eov, 10); |
1716 | } else if (!strcmp(this_char, MNTOPT_LOGBSIZE)) { | 1706 | } else if (!strcmp(this_char, MNTOPT_LOGBSIZE)) { |
1717 | if (!value || !*value) { | 1707 | if (!value || !*value) { |
1718 | printk("XFS: %s option requires an argument\n", | 1708 | cmn_err(CE_WARN, |
1709 | "XFS: %s option requires an argument", | ||
1719 | this_char); | 1710 | this_char); |
1720 | return EINVAL; | 1711 | return EINVAL; |
1721 | } | 1712 | } |
1722 | args->logbufsize = suffix_strtoul(value, &eov, 10); | 1713 | args->logbufsize = suffix_strtoul(value, &eov, 10); |
1723 | } else if (!strcmp(this_char, MNTOPT_LOGDEV)) { | 1714 | } else if (!strcmp(this_char, MNTOPT_LOGDEV)) { |
1724 | if (!value || !*value) { | 1715 | if (!value || !*value) { |
1725 | printk("XFS: %s option requires an argument\n", | 1716 | cmn_err(CE_WARN, |
1717 | "XFS: %s option requires an argument", | ||
1726 | this_char); | 1718 | this_char); |
1727 | return EINVAL; | 1719 | return EINVAL; |
1728 | } | 1720 | } |
1729 | strncpy(args->logname, value, MAXNAMELEN); | 1721 | strncpy(args->logname, value, MAXNAMELEN); |
1730 | } else if (!strcmp(this_char, MNTOPT_MTPT)) { | 1722 | } else if (!strcmp(this_char, MNTOPT_MTPT)) { |
1731 | if (!value || !*value) { | 1723 | if (!value || !*value) { |
1732 | printk("XFS: %s option requires an argument\n", | 1724 | cmn_err(CE_WARN, |
1725 | "XFS: %s option requires an argument", | ||
1733 | this_char); | 1726 | this_char); |
1734 | return EINVAL; | 1727 | return EINVAL; |
1735 | } | 1728 | } |
1736 | strncpy(args->mtpt, value, MAXNAMELEN); | 1729 | strncpy(args->mtpt, value, MAXNAMELEN); |
1737 | } else if (!strcmp(this_char, MNTOPT_RTDEV)) { | 1730 | } else if (!strcmp(this_char, MNTOPT_RTDEV)) { |
1738 | if (!value || !*value) { | 1731 | if (!value || !*value) { |
1739 | printk("XFS: %s option requires an argument\n", | 1732 | cmn_err(CE_WARN, |
1733 | "XFS: %s option requires an argument", | ||
1740 | this_char); | 1734 | this_char); |
1741 | return EINVAL; | 1735 | return EINVAL; |
1742 | } | 1736 | } |
1743 | strncpy(args->rtname, value, MAXNAMELEN); | 1737 | strncpy(args->rtname, value, MAXNAMELEN); |
1744 | } else if (!strcmp(this_char, MNTOPT_BIOSIZE)) { | 1738 | } else if (!strcmp(this_char, MNTOPT_BIOSIZE)) { |
1745 | if (!value || !*value) { | 1739 | if (!value || !*value) { |
1746 | printk("XFS: %s option requires an argument\n", | 1740 | cmn_err(CE_WARN, |
1741 | "XFS: %s option requires an argument", | ||
1747 | this_char); | 1742 | this_char); |
1748 | return EINVAL; | 1743 | return EINVAL; |
1749 | } | 1744 | } |
@@ -1752,7 +1747,8 @@ xfs_parseargs( | |||
1752 | args->iosizelog = (uint8_t) iosize; | 1747 | args->iosizelog = (uint8_t) iosize; |
1753 | } else if (!strcmp(this_char, MNTOPT_ALLOCSIZE)) { | 1748 | } else if (!strcmp(this_char, MNTOPT_ALLOCSIZE)) { |
1754 | if (!value || !*value) { | 1749 | if (!value || !*value) { |
1755 | printk("XFS: %s option requires an argument\n", | 1750 | cmn_err(CE_WARN, |
1751 | "XFS: %s option requires an argument", | ||
1756 | this_char); | 1752 | this_char); |
1757 | return EINVAL; | 1753 | return EINVAL; |
1758 | } | 1754 | } |
@@ -1761,7 +1757,8 @@ xfs_parseargs( | |||
1761 | args->iosizelog = ffs(iosize) - 1; | 1757 | args->iosizelog = ffs(iosize) - 1; |
1762 | } else if (!strcmp(this_char, MNTOPT_IHASHSIZE)) { | 1758 | } else if (!strcmp(this_char, MNTOPT_IHASHSIZE)) { |
1763 | if (!value || !*value) { | 1759 | if (!value || !*value) { |
1764 | printk("XFS: %s option requires an argument\n", | 1760 | cmn_err(CE_WARN, |
1761 | "XFS: %s option requires an argument", | ||
1765 | this_char); | 1762 | this_char); |
1766 | return EINVAL; | 1763 | return EINVAL; |
1767 | } | 1764 | } |
@@ -1782,7 +1779,8 @@ xfs_parseargs( | |||
1782 | } else if (!strcmp(this_char, MNTOPT_INO64)) { | 1779 | } else if (!strcmp(this_char, MNTOPT_INO64)) { |
1783 | args->flags |= XFSMNT_INO64; | 1780 | args->flags |= XFSMNT_INO64; |
1784 | #if !XFS_BIG_INUMS | 1781 | #if !XFS_BIG_INUMS |
1785 | printk("XFS: %s option not allowed on this system\n", | 1782 | cmn_err(CE_WARN, |
1783 | "XFS: %s option not allowed on this system", | ||
1786 | this_char); | 1784 | this_char); |
1787 | return EINVAL; | 1785 | return EINVAL; |
1788 | #endif | 1786 | #endif |
@@ -1792,14 +1790,16 @@ xfs_parseargs( | |||
1792 | args->flags |= XFSMNT_SWALLOC; | 1790 | args->flags |= XFSMNT_SWALLOC; |
1793 | } else if (!strcmp(this_char, MNTOPT_SUNIT)) { | 1791 | } else if (!strcmp(this_char, MNTOPT_SUNIT)) { |
1794 | if (!value || !*value) { | 1792 | if (!value || !*value) { |
1795 | printk("XFS: %s option requires an argument\n", | 1793 | cmn_err(CE_WARN, |
1794 | "XFS: %s option requires an argument", | ||
1796 | this_char); | 1795 | this_char); |
1797 | return EINVAL; | 1796 | return EINVAL; |
1798 | } | 1797 | } |
1799 | dsunit = simple_strtoul(value, &eov, 10); | 1798 | dsunit = simple_strtoul(value, &eov, 10); |
1800 | } else if (!strcmp(this_char, MNTOPT_SWIDTH)) { | 1799 | } else if (!strcmp(this_char, MNTOPT_SWIDTH)) { |
1801 | if (!value || !*value) { | 1800 | if (!value || !*value) { |
1802 | printk("XFS: %s option requires an argument\n", | 1801 | cmn_err(CE_WARN, |
1802 | "XFS: %s option requires an argument", | ||
1803 | this_char); | 1803 | this_char); |
1804 | return EINVAL; | 1804 | return EINVAL; |
1805 | } | 1805 | } |
@@ -1807,7 +1807,8 @@ xfs_parseargs( | |||
1807 | } else if (!strcmp(this_char, MNTOPT_64BITINODE)) { | 1807 | } else if (!strcmp(this_char, MNTOPT_64BITINODE)) { |
1808 | args->flags &= ~XFSMNT_32BITINODES; | 1808 | args->flags &= ~XFSMNT_32BITINODES; |
1809 | #if !XFS_BIG_INUMS | 1809 | #if !XFS_BIG_INUMS |
1810 | printk("XFS: %s option not allowed on this system\n", | 1810 | cmn_err(CE_WARN, |
1811 | "XFS: %s option not allowed on this system", | ||
1811 | this_char); | 1812 | this_char); |
1812 | return EINVAL; | 1813 | return EINVAL; |
1813 | #endif | 1814 | #endif |
@@ -1831,36 +1832,41 @@ xfs_parseargs( | |||
1831 | args->flags &= ~XFSMNT_ATTR2; | 1832 | args->flags &= ~XFSMNT_ATTR2; |
1832 | } else if (!strcmp(this_char, "osyncisdsync")) { | 1833 | } else if (!strcmp(this_char, "osyncisdsync")) { |
1833 | /* no-op, this is now the default */ | 1834 | /* no-op, this is now the default */ |
1834 | printk("XFS: osyncisdsync is now the default, option is deprecated.\n"); | 1835 | cmn_err(CE_WARN, |
1836 | "XFS: osyncisdsync is now the default, option is deprecated."); | ||
1835 | } else if (!strcmp(this_char, "irixsgid")) { | 1837 | } else if (!strcmp(this_char, "irixsgid")) { |
1836 | printk("XFS: irixsgid is now a sysctl(2) variable, option is deprecated.\n"); | 1838 | cmn_err(CE_WARN, |
1839 | "XFS: irixsgid is now a sysctl(2) variable, option is deprecated."); | ||
1837 | } else { | 1840 | } else { |
1838 | printk("XFS: unknown mount option [%s].\n", this_char); | 1841 | cmn_err(CE_WARN, |
1842 | "XFS: unknown mount option [%s].", this_char); | ||
1839 | return EINVAL; | 1843 | return EINVAL; |
1840 | } | 1844 | } |
1841 | } | 1845 | } |
1842 | 1846 | ||
1843 | if (args->flags & XFSMNT_NORECOVERY) { | 1847 | if (args->flags & XFSMNT_NORECOVERY) { |
1844 | if ((vfsp->vfs_flag & VFS_RDONLY) == 0) { | 1848 | if ((vfsp->vfs_flag & VFS_RDONLY) == 0) { |
1845 | printk("XFS: no-recovery mounts must be read-only.\n"); | 1849 | cmn_err(CE_WARN, |
1850 | "XFS: no-recovery mounts must be read-only."); | ||
1846 | return EINVAL; | 1851 | return EINVAL; |
1847 | } | 1852 | } |
1848 | } | 1853 | } |
1849 | 1854 | ||
1850 | if ((args->flags & XFSMNT_NOALIGN) && (dsunit || dswidth)) { | 1855 | if ((args->flags & XFSMNT_NOALIGN) && (dsunit || dswidth)) { |
1851 | printk( | 1856 | cmn_err(CE_WARN, |
1852 | "XFS: sunit and swidth options incompatible with the noalign option\n"); | 1857 | "XFS: sunit and swidth options incompatible with the noalign option"); |
1853 | return EINVAL; | 1858 | return EINVAL; |
1854 | } | 1859 | } |
1855 | 1860 | ||
1856 | if ((dsunit && !dswidth) || (!dsunit && dswidth)) { | 1861 | if ((dsunit && !dswidth) || (!dsunit && dswidth)) { |
1857 | printk("XFS: sunit and swidth must be specified together\n"); | 1862 | cmn_err(CE_WARN, |
1863 | "XFS: sunit and swidth must be specified together"); | ||
1858 | return EINVAL; | 1864 | return EINVAL; |
1859 | } | 1865 | } |
1860 | 1866 | ||
1861 | if (dsunit && (dswidth % dsunit != 0)) { | 1867 | if (dsunit && (dswidth % dsunit != 0)) { |
1862 | printk( | 1868 | cmn_err(CE_WARN, |
1863 | "XFS: stripe width (%d) must be a multiple of the stripe unit (%d)\n", | 1869 | "XFS: stripe width (%d) must be a multiple of the stripe unit (%d)", |
1864 | dswidth, dsunit); | 1870 | dswidth, dsunit); |
1865 | return EINVAL; | 1871 | return EINVAL; |
1866 | } | 1872 | } |
@@ -1907,7 +1913,7 @@ xfs_showargs( | |||
1907 | }; | 1913 | }; |
1908 | struct proc_xfs_info *xfs_infop; | 1914 | struct proc_xfs_info *xfs_infop; |
1909 | struct xfs_mount *mp = XFS_BHVTOM(bhv); | 1915 | struct xfs_mount *mp = XFS_BHVTOM(bhv); |
1910 | struct vfs *vfsp = XFS_MTOVFS(mp); | 1916 | struct bhv_vfs *vfsp = XFS_MTOVFS(mp); |
1911 | 1917 | ||
1912 | for (xfs_infop = xfs_info; xfs_infop->flag; xfs_infop++) { | 1918 | for (xfs_infop = xfs_info; xfs_infop->flag; xfs_infop++) { |
1913 | if (mp->m_flags & xfs_infop->flag) | 1919 | if (mp->m_flags & xfs_infop->flag) |
@@ -1967,7 +1973,7 @@ xfs_freeze( | |||
1967 | } | 1973 | } |
1968 | 1974 | ||
1969 | 1975 | ||
1970 | vfsops_t xfs_vfsops = { | 1976 | bhv_vfsops_t xfs_vfsops = { |
1971 | BHV_IDENTITY_INIT(VFS_BHV_XFS,VFS_POSITION_XFS), | 1977 | BHV_IDENTITY_INIT(VFS_BHV_XFS,VFS_POSITION_XFS), |
1972 | .vfs_parseargs = xfs_parseargs, | 1978 | .vfs_parseargs = xfs_parseargs, |
1973 | .vfs_showargs = xfs_showargs, | 1979 | .vfs_showargs = xfs_showargs, |