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.c181
1 files changed, 106 insertions, 75 deletions
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index f1a904e23ade..7bdbd991ab1c 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -1,74 +1,58 @@
1/* 1/*
2 * XFS filesystem operations. 2 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
3 * 4 *
4 * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. 5 * This program is free software; you can redistribute it and/or
5 * 6 * modify it under the terms of the GNU General Public License as
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of version 2 of the GNU General Public License as
8 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
9 * 8 *
10 * This program is distributed in the hope that it would be useful, but 9 * This program is distributed in the hope that it would be useful,
11 * WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * 12 * GNU General Public License for more details.
14 * Further, this software is distributed without any warranty that it is
15 * free of the rightful claim of any third person regarding infringement
16 * or the like. Any license provided herein, whether implied or
17 * otherwise, applies only to this software file. Patent licenses, if
18 * any, provided herein do not apply to combinations of this program with
19 * other software, or any other product whatsoever.
20 *
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write the Free Software Foundation, Inc., 59
23 * Temple Place - Suite 330, Boston MA 02111-1307, USA.
24 *
25 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
26 * Mountain View, CA 94043, or:
27 * 13 *
28 * http://www.sgi.com 14 * You should have received a copy of the GNU General Public License
29 * 15 * along with this program; if not, write the Free Software Foundation,
30 * For further information regarding this notice, see: 16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31 *
32 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
33 */ 17 */
34
35#include "xfs.h" 18#include "xfs.h"
36#include "xfs_macros.h" 19#include "xfs_fs.h"
37#include "xfs_types.h" 20#include "xfs_types.h"
38#include "xfs_inum.h" 21#include "xfs_bit.h"
39#include "xfs_log.h" 22#include "xfs_log.h"
23#include "xfs_inum.h"
40#include "xfs_trans.h" 24#include "xfs_trans.h"
41#include "xfs_sb.h" 25#include "xfs_sb.h"
26#include "xfs_ag.h"
42#include "xfs_dir.h" 27#include "xfs_dir.h"
43#include "xfs_dir2.h" 28#include "xfs_dir2.h"
44#include "xfs_dmapi.h" 29#include "xfs_dmapi.h"
45#include "xfs_mount.h" 30#include "xfs_mount.h"
31#include "xfs_da_btree.h"
46#include "xfs_bmap_btree.h" 32#include "xfs_bmap_btree.h"
47#include "xfs_ialloc_btree.h" 33#include "xfs_ialloc_btree.h"
48#include "xfs_alloc_btree.h" 34#include "xfs_alloc_btree.h"
49#include "xfs_btree.h"
50#include "xfs_alloc.h"
51#include "xfs_ialloc.h"
52#include "xfs_attr_sf.h"
53#include "xfs_dir_sf.h" 35#include "xfs_dir_sf.h"
54#include "xfs_dir2_sf.h" 36#include "xfs_dir2_sf.h"
37#include "xfs_attr_sf.h"
55#include "xfs_dinode.h" 38#include "xfs_dinode.h"
56#include "xfs_inode_item.h"
57#include "xfs_inode.h" 39#include "xfs_inode.h"
58#include "xfs_ag.h" 40#include "xfs_inode_item.h"
41#include "xfs_btree.h"
42#include "xfs_alloc.h"
43#include "xfs_ialloc.h"
44#include "xfs_quota.h"
59#include "xfs_error.h" 45#include "xfs_error.h"
60#include "xfs_bmap.h" 46#include "xfs_bmap.h"
61#include "xfs_da_btree.h"
62#include "xfs_rw.h" 47#include "xfs_rw.h"
63#include "xfs_refcache.h" 48#include "xfs_refcache.h"
64#include "xfs_buf_item.h" 49#include "xfs_buf_item.h"
65#include "xfs_extfree_item.h" 50#include "xfs_log_priv.h"
66#include "xfs_quota.h"
67#include "xfs_dir2_trace.h" 51#include "xfs_dir2_trace.h"
52#include "xfs_extfree_item.h"
68#include "xfs_acl.h" 53#include "xfs_acl.h"
69#include "xfs_attr.h" 54#include "xfs_attr.h"
70#include "xfs_clnt.h" 55#include "xfs_clnt.h"
71#include "xfs_log_priv.h"
72 56
73STATIC int xfs_sync(bhv_desc_t *, int, cred_t *); 57STATIC int xfs_sync(bhv_desc_t *, int, cred_t *);
74 58
@@ -230,9 +214,7 @@ xfs_start_flags(
230 } 214 }
231 215
232 if (ap->logbufs != -1 && 216 if (ap->logbufs != -1 &&
233#if defined(DEBUG) || defined(XLOG_NOLOG)
234 ap->logbufs != 0 && 217 ap->logbufs != 0 &&
235#endif
236 (ap->logbufs < XLOG_MIN_ICLOGS || 218 (ap->logbufs < XLOG_MIN_ICLOGS ||
237 ap->logbufs > XLOG_MAX_ICLOGS)) { 219 ap->logbufs > XLOG_MAX_ICLOGS)) {
238 cmn_err(CE_WARN, 220 cmn_err(CE_WARN,
@@ -242,6 +224,7 @@ xfs_start_flags(
242 } 224 }
243 mp->m_logbufs = ap->logbufs; 225 mp->m_logbufs = ap->logbufs;
244 if (ap->logbufsize != -1 && 226 if (ap->logbufsize != -1 &&
227 ap->logbufsize != 0 &&
245 ap->logbufsize != 16 * 1024 && 228 ap->logbufsize != 16 * 1024 &&
246 ap->logbufsize != 32 * 1024 && 229 ap->logbufsize != 32 * 1024 &&
247 ap->logbufsize != 64 * 1024 && 230 ap->logbufsize != 64 * 1024 &&
@@ -257,6 +240,14 @@ xfs_start_flags(
257 mp->m_fsname_len = strlen(ap->fsname) + 1; 240 mp->m_fsname_len = strlen(ap->fsname) + 1;
258 mp->m_fsname = kmem_alloc(mp->m_fsname_len, KM_SLEEP); 241 mp->m_fsname = kmem_alloc(mp->m_fsname_len, KM_SLEEP);
259 strcpy(mp->m_fsname, ap->fsname); 242 strcpy(mp->m_fsname, ap->fsname);
243 if (ap->rtname[0]) {
244 mp->m_rtname = kmem_alloc(strlen(ap->rtname) + 1, KM_SLEEP);
245 strcpy(mp->m_rtname, ap->rtname);
246 }
247 if (ap->logname[0]) {
248 mp->m_logname = kmem_alloc(strlen(ap->logname) + 1, KM_SLEEP);
249 strcpy(mp->m_logname, ap->logname);
250 }
260 251
261 if (ap->flags & XFSMNT_WSYNC) 252 if (ap->flags & XFSMNT_WSYNC)
262 mp->m_flags |= XFS_MOUNT_WSYNC; 253 mp->m_flags |= XFS_MOUNT_WSYNC;
@@ -268,21 +259,16 @@ xfs_start_flags(
268#endif 259#endif
269 if (ap->flags & XFSMNT_NOATIME) 260 if (ap->flags & XFSMNT_NOATIME)
270 mp->m_flags |= XFS_MOUNT_NOATIME; 261 mp->m_flags |= XFS_MOUNT_NOATIME;
271
272 if (ap->flags & XFSMNT_RETERR) 262 if (ap->flags & XFSMNT_RETERR)
273 mp->m_flags |= XFS_MOUNT_RETERR; 263 mp->m_flags |= XFS_MOUNT_RETERR;
274
275 if (ap->flags & XFSMNT_NOALIGN) 264 if (ap->flags & XFSMNT_NOALIGN)
276 mp->m_flags |= XFS_MOUNT_NOALIGN; 265 mp->m_flags |= XFS_MOUNT_NOALIGN;
277
278 if (ap->flags & XFSMNT_SWALLOC) 266 if (ap->flags & XFSMNT_SWALLOC)
279 mp->m_flags |= XFS_MOUNT_SWALLOC; 267 mp->m_flags |= XFS_MOUNT_SWALLOC;
280
281 if (ap->flags & XFSMNT_OSYNCISOSYNC) 268 if (ap->flags & XFSMNT_OSYNCISOSYNC)
282 mp->m_flags |= XFS_MOUNT_OSYNCISOSYNC; 269 mp->m_flags |= XFS_MOUNT_OSYNCISOSYNC;
283
284 if (ap->flags & XFSMNT_32BITINODES) 270 if (ap->flags & XFSMNT_32BITINODES)
285 mp->m_flags |= (XFS_MOUNT_32BITINODES | XFS_MOUNT_32BITINOOPT); 271 mp->m_flags |= XFS_MOUNT_32BITINODES;
286 272
287 if (ap->flags & XFSMNT_IOSIZE) { 273 if (ap->flags & XFSMNT_IOSIZE) {
288 if (ap->iosizelog > XFS_MAX_IO_LOG || 274 if (ap->iosizelog > XFS_MAX_IO_LOG ||
@@ -300,12 +286,15 @@ xfs_start_flags(
300 286
301 if (ap->flags & XFSMNT_IHASHSIZE) 287 if (ap->flags & XFSMNT_IHASHSIZE)
302 mp->m_flags |= XFS_MOUNT_IHASHSIZE; 288 mp->m_flags |= XFS_MOUNT_IHASHSIZE;
303
304 if (ap->flags & XFSMNT_IDELETE) 289 if (ap->flags & XFSMNT_IDELETE)
305 mp->m_flags |= XFS_MOUNT_IDELETE; 290 mp->m_flags |= XFS_MOUNT_IDELETE;
306
307 if (ap->flags & XFSMNT_DIRSYNC) 291 if (ap->flags & XFSMNT_DIRSYNC)
308 mp->m_flags |= XFS_MOUNT_DIRSYNC; 292 mp->m_flags |= XFS_MOUNT_DIRSYNC;
293 if (ap->flags & XFSMNT_COMPAT_ATTR)
294 mp->m_flags |= XFS_MOUNT_COMPAT_ATTR;
295
296 if (ap->flags2 & XFSMNT2_COMPAT_IOSIZE)
297 mp->m_flags |= XFS_MOUNT_COMPAT_IOSIZE;
309 298
310 /* 299 /*
311 * no recovery flag requires a read-only mount 300 * no recovery flag requires a read-only mount
@@ -321,8 +310,8 @@ xfs_start_flags(
321 310
322 if (ap->flags & XFSMNT_NOUUID) 311 if (ap->flags & XFSMNT_NOUUID)
323 mp->m_flags |= XFS_MOUNT_NOUUID; 312 mp->m_flags |= XFS_MOUNT_NOUUID;
324 if (ap->flags & XFSMNT_NOLOGFLUSH) 313 if (ap->flags & XFSMNT_BARRIER)
325 mp->m_flags |= XFS_MOUNT_NOLOGFLUSH; 314 mp->m_flags |= XFS_MOUNT_BARRIER;
326 315
327 return 0; 316 return 0;
328} 317}
@@ -393,6 +382,10 @@ xfs_finish_flags(
393 return XFS_ERROR(EINVAL); 382 return XFS_ERROR(EINVAL);
394 } 383 }
395 384
385 if (XFS_SB_VERSION_HASATTR2(&mp->m_sb)) {
386 mp->m_flags &= ~XFS_MOUNT_COMPAT_ATTR;
387 }
388
396 return 0; 389 return 0;
397} 390}
398 391
@@ -512,8 +505,14 @@ xfs_mount(
512 goto error2; 505 goto error2;
513 506
514 error = XFS_IOINIT(vfsp, args, flags); 507 error = XFS_IOINIT(vfsp, args, flags);
515 if (!error) 508 if (error)
516 return 0; 509 goto error2;
510
511 if ((args->flags & XFSMNT_BARRIER) &&
512 !(XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY))
513 xfs_mountfs_check_barriers(mp);
514 return 0;
515
517error2: 516error2:
518 if (mp->m_sb_bp) 517 if (mp->m_sb_bp)
519 xfs_freesb(mp); 518 xfs_freesb(mp);
@@ -656,19 +655,24 @@ xfs_mntupdate(
656 else 655 else
657 mp->m_flags &= ~XFS_MOUNT_NOATIME; 656 mp->m_flags &= ~XFS_MOUNT_NOATIME;
658 657
659 if (!(vfsp->vfs_flag & VFS_RDONLY)) { 658 if ((vfsp->vfs_flag & VFS_RDONLY) &&
660 VFS_SYNC(vfsp, SYNC_FSDATA|SYNC_BDFLUSH|SYNC_ATTR, NULL, error); 659 !(*flags & MS_RDONLY)) {
660 vfsp->vfs_flag &= ~VFS_RDONLY;
661
662 if (args->flags & XFSMNT_BARRIER)
663 xfs_mountfs_check_barriers(mp);
661 } 664 }
662 665
663 if (*flags & MS_RDONLY) { 666 if (!(vfsp->vfs_flag & VFS_RDONLY) &&
667 (*flags & MS_RDONLY)) {
668 VFS_SYNC(vfsp, SYNC_FSDATA|SYNC_BDFLUSH|SYNC_ATTR, NULL, error);
669
664 xfs_quiesce_fs(mp); 670 xfs_quiesce_fs(mp);
665 671
666 /* Ok now write out an unmount record */ 672 /* Ok now write out an unmount record */
667 xfs_log_unmount_write(mp); 673 xfs_log_unmount_write(mp);
668 xfs_unmountfs_writesb(mp); 674 xfs_unmountfs_writesb(mp);
669 vfsp->vfs_flag |= VFS_RDONLY; 675 vfsp->vfs_flag |= VFS_RDONLY;
670 } else {
671 vfsp->vfs_flag &= ~VFS_RDONLY;
672 } 676 }
673 677
674 return 0; 678 return 0;
@@ -892,7 +896,7 @@ xfs_sync(
892 * only available by calling this routine. 896 * only available by calling this routine.
893 * 897 *
894 */ 898 */
895STATIC int 899int
896xfs_sync_inodes( 900xfs_sync_inodes(
897 xfs_mount_t *mp, 901 xfs_mount_t *mp,
898 int flags, 902 int flags,
@@ -976,7 +980,7 @@ xfs_sync_inodes(
976 ipointer = (xfs_iptr_t *)kmem_zalloc(sizeof(xfs_iptr_t), KM_SLEEP); 980 ipointer = (xfs_iptr_t *)kmem_zalloc(sizeof(xfs_iptr_t), KM_SLEEP);
977 981
978 fflag = XFS_B_ASYNC; /* default is don't wait */ 982 fflag = XFS_B_ASYNC; /* default is don't wait */
979 if (flags & SYNC_BDFLUSH) 983 if (flags & (SYNC_BDFLUSH | SYNC_DELWRI))
980 fflag = XFS_B_DELWRI; 984 fflag = XFS_B_DELWRI;
981 if (flags & SYNC_WAIT) 985 if (flags & SYNC_WAIT)
982 fflag = 0; /* synchronous overrides all */ 986 fflag = 0; /* synchronous overrides all */
@@ -1628,11 +1632,17 @@ xfs_vget(
1628#define MNTOPT_ALLOCSIZE "allocsize" /* preferred allocation size */ 1632#define MNTOPT_ALLOCSIZE "allocsize" /* preferred allocation size */
1629#define MNTOPT_IHASHSIZE "ihashsize" /* size of inode hash table */ 1633#define MNTOPT_IHASHSIZE "ihashsize" /* size of inode hash table */
1630#define MNTOPT_NORECOVERY "norecovery" /* don't run XFS recovery */ 1634#define MNTOPT_NORECOVERY "norecovery" /* don't run XFS recovery */
1631#define MNTOPT_NOLOGFLUSH "nologflush" /* don't hard flush on log writes */ 1635#define MNTOPT_BARRIER "barrier" /* use writer barriers for log write and
1636 * unwritten extent conversion */
1632#define MNTOPT_OSYNCISOSYNC "osyncisosync" /* o_sync is REALLY o_sync */ 1637#define MNTOPT_OSYNCISOSYNC "osyncisosync" /* o_sync is REALLY o_sync */
1633#define MNTOPT_64BITINODE "inode64" /* inodes can be allocated anywhere */ 1638#define MNTOPT_64BITINODE "inode64" /* inodes can be allocated anywhere */
1634#define MNTOPT_IKEEP "ikeep" /* do not free empty inode clusters */ 1639#define MNTOPT_IKEEP "ikeep" /* do not free empty inode clusters */
1635#define MNTOPT_NOIKEEP "noikeep" /* free empty inode clusters */ 1640#define MNTOPT_NOIKEEP "noikeep" /* free empty inode clusters */
1641#define MNTOPT_LARGEIO "largeio" /* report large I/O sizes in stat() */
1642#define MNTOPT_NOLARGEIO "nolargeio" /* do not report large I/O sizes
1643 * in stat(). */
1644#define MNTOPT_ATTR2 "attr2" /* do use attr2 attribute format */
1645#define MNTOPT_NOATTR2 "noattr2" /* do not use attr2 attribute format */
1636 1646
1637STATIC unsigned long 1647STATIC unsigned long
1638suffix_strtoul(const char *cp, char **endp, unsigned int base) 1648suffix_strtoul(const char *cp, char **endp, unsigned int base)
@@ -1669,12 +1679,15 @@ xfs_parseargs(
1669 int dsunit, dswidth, vol_dsunit, vol_dswidth; 1679 int dsunit, dswidth, vol_dsunit, vol_dswidth;
1670 int iosize; 1680 int iosize;
1671 1681
1682 args->flags2 |= XFSMNT2_COMPAT_IOSIZE;
1683 args->flags |= XFSMNT_COMPAT_ATTR;
1684
1672#if 0 /* XXX: off by default, until some remaining issues ironed out */ 1685#if 0 /* XXX: off by default, until some remaining issues ironed out */
1673 args->flags |= XFSMNT_IDELETE; /* default to on */ 1686 args->flags |= XFSMNT_IDELETE; /* default to on */
1674#endif 1687#endif
1675 1688
1676 if (!options) 1689 if (!options)
1677 return 0; 1690 goto done;
1678 1691
1679 iosize = dsunit = dswidth = vol_dsunit = vol_dswidth = 0; 1692 iosize = dsunit = dswidth = vol_dsunit = vol_dswidth = 0;
1680 1693
@@ -1791,12 +1804,20 @@ xfs_parseargs(
1791#endif 1804#endif
1792 } else if (!strcmp(this_char, MNTOPT_NOUUID)) { 1805 } else if (!strcmp(this_char, MNTOPT_NOUUID)) {
1793 args->flags |= XFSMNT_NOUUID; 1806 args->flags |= XFSMNT_NOUUID;
1794 } else if (!strcmp(this_char, MNTOPT_NOLOGFLUSH)) { 1807 } else if (!strcmp(this_char, MNTOPT_BARRIER)) {
1795 args->flags |= XFSMNT_NOLOGFLUSH; 1808 args->flags |= XFSMNT_BARRIER;
1796 } else if (!strcmp(this_char, MNTOPT_IKEEP)) { 1809 } else if (!strcmp(this_char, MNTOPT_IKEEP)) {
1797 args->flags &= ~XFSMNT_IDELETE; 1810 args->flags &= ~XFSMNT_IDELETE;
1798 } else if (!strcmp(this_char, MNTOPT_NOIKEEP)) { 1811 } else if (!strcmp(this_char, MNTOPT_NOIKEEP)) {
1799 args->flags |= XFSMNT_IDELETE; 1812 args->flags |= XFSMNT_IDELETE;
1813 } else if (!strcmp(this_char, MNTOPT_LARGEIO)) {
1814 args->flags2 &= ~XFSMNT2_COMPAT_IOSIZE;
1815 } else if (!strcmp(this_char, MNTOPT_NOLARGEIO)) {
1816 args->flags2 |= XFSMNT2_COMPAT_IOSIZE;
1817 } else if (!strcmp(this_char, MNTOPT_ATTR2)) {
1818 args->flags &= ~XFSMNT_COMPAT_ATTR;
1819 } else if (!strcmp(this_char, MNTOPT_NOATTR2)) {
1820 args->flags |= XFSMNT_COMPAT_ATTR;
1800 } else if (!strcmp(this_char, "osyncisdsync")) { 1821 } else if (!strcmp(this_char, "osyncisdsync")) {
1801 /* no-op, this is now the default */ 1822 /* no-op, this is now the default */
1802printk("XFS: osyncisdsync is now the default, option is deprecated.\n"); 1823printk("XFS: osyncisdsync is now the default, option is deprecated.\n");
@@ -1846,6 +1867,11 @@ printk("XFS: irixsgid is now a sysctl(2) variable, option is deprecated.\n");
1846 args->sunit = args->swidth = 0; 1867 args->sunit = args->swidth = 0;
1847 } 1868 }
1848 1869
1870done:
1871 if (args->flags & XFSMNT_32BITINODES)
1872 vfsp->vfs_flag |= VFS_32BITINODES;
1873 if (args->flags2)
1874 args->flags |= XFSMNT_FLAGS2;
1849 return 0; 1875 return 0;
1850} 1876}
1851 1877
@@ -1866,7 +1892,7 @@ xfs_showargs(
1866 { XFS_MOUNT_NOUUID, "," MNTOPT_NOUUID }, 1892 { XFS_MOUNT_NOUUID, "," MNTOPT_NOUUID },
1867 { XFS_MOUNT_NORECOVERY, "," MNTOPT_NORECOVERY }, 1893 { XFS_MOUNT_NORECOVERY, "," MNTOPT_NORECOVERY },
1868 { XFS_MOUNT_OSYNCISOSYNC, "," MNTOPT_OSYNCISOSYNC }, 1894 { XFS_MOUNT_OSYNCISOSYNC, "," MNTOPT_OSYNCISOSYNC },
1869 { XFS_MOUNT_NOLOGFLUSH, "," MNTOPT_NOLOGFLUSH }, 1895 { XFS_MOUNT_BARRIER, "," MNTOPT_BARRIER },
1870 { XFS_MOUNT_IDELETE, "," MNTOPT_NOIKEEP }, 1896 { XFS_MOUNT_IDELETE, "," MNTOPT_NOIKEEP },
1871 { 0, NULL } 1897 { 0, NULL }
1872 }; 1898 };
@@ -1883,21 +1909,20 @@ xfs_showargs(
1883 seq_printf(m, "," MNTOPT_IHASHSIZE "=%d", mp->m_ihsize); 1909 seq_printf(m, "," MNTOPT_IHASHSIZE "=%d", mp->m_ihsize);
1884 1910
1885 if (mp->m_flags & XFS_MOUNT_DFLT_IOSIZE) 1911 if (mp->m_flags & XFS_MOUNT_DFLT_IOSIZE)
1886 seq_printf(m, "," MNTOPT_ALLOCSIZE "=%d", 1<<mp->m_writeio_log); 1912 seq_printf(m, "," MNTOPT_ALLOCSIZE "=%dk",
1913 (int)(1 << mp->m_writeio_log) >> 10);
1887 1914
1888 if (mp->m_logbufs > 0) 1915 if (mp->m_logbufs > 0)
1889 seq_printf(m, "," MNTOPT_LOGBUFS "=%d", mp->m_logbufs); 1916 seq_printf(m, "," MNTOPT_LOGBUFS "=%d", mp->m_logbufs);
1890 1917
1891 if (mp->m_logbsize > 0) 1918 if (mp->m_logbsize > 0)
1892 seq_printf(m, "," MNTOPT_LOGBSIZE "=%d", mp->m_logbsize); 1919 seq_printf(m, "," MNTOPT_LOGBSIZE "=%dk", mp->m_logbsize >> 10);
1893 1920
1894 if (mp->m_ddev_targp != mp->m_logdev_targp) 1921 if (mp->m_logname)
1895 seq_printf(m, "," MNTOPT_LOGDEV "=%s", 1922 seq_printf(m, "," MNTOPT_LOGDEV "=%s", mp->m_logname);
1896 XFS_BUFTARG_NAME(mp->m_logdev_targp));
1897 1923
1898 if (mp->m_rtdev_targp && mp->m_ddev_targp != mp->m_rtdev_targp) 1924 if (mp->m_rtname)
1899 seq_printf(m, "," MNTOPT_RTDEV "=%s", 1925 seq_printf(m, "," MNTOPT_RTDEV "=%s", mp->m_rtname);
1900 XFS_BUFTARG_NAME(mp->m_rtdev_targp));
1901 1926
1902 if (mp->m_dalign > 0) 1927 if (mp->m_dalign > 0)
1903 seq_printf(m, "," MNTOPT_SUNIT "=%d", 1928 seq_printf(m, "," MNTOPT_SUNIT "=%d",
@@ -1907,7 +1932,13 @@ xfs_showargs(
1907 seq_printf(m, "," MNTOPT_SWIDTH "=%d", 1932 seq_printf(m, "," MNTOPT_SWIDTH "=%d",
1908 (int)XFS_FSB_TO_BB(mp, mp->m_swidth)); 1933 (int)XFS_FSB_TO_BB(mp, mp->m_swidth));
1909 1934
1910 if (!(mp->m_flags & XFS_MOUNT_32BITINOOPT)) 1935 if (!(mp->m_flags & XFS_MOUNT_COMPAT_ATTR))
1936 seq_printf(m, "," MNTOPT_ATTR2);
1937
1938 if (!(mp->m_flags & XFS_MOUNT_COMPAT_IOSIZE))
1939 seq_printf(m, "," MNTOPT_LARGEIO);
1940
1941 if (!(vfsp->vfs_flag & VFS_32BITINODES))
1911 seq_printf(m, "," MNTOPT_64BITINODE); 1942 seq_printf(m, "," MNTOPT_64BITINODE);
1912 1943
1913 if (vfsp->vfs_flag & VFS_GRPID) 1944 if (vfsp->vfs_flag & VFS_GRPID)