aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_vfsops.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@sgi.com>2006-01-10 23:27:18 -0500
committerNathan Scott <nathans@sgi.com>2006-01-10 23:27:18 -0500
commit4ef19dddbaf2f24e492c18112fd8a04ce116daca (patch)
tree857a14290f682a9a1bc71d9a6b0e20f095c5cc91 /fs/xfs/xfs_vfsops.c
parentd3a9b1f9da4ee3e6d284148412097621b1c9e575 (diff)
[XFS] enable write barriers by default
SGI-PV: 912426 SGI-Modid: xfs-linux-melb:xfs-kern:201981a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_vfsops.c')
-rw-r--r--fs/xfs/xfs_vfsops.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index 7bdbd991ab1c..3406399e25b3 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -312,6 +312,8 @@ xfs_start_flags(
312 mp->m_flags |= XFS_MOUNT_NOUUID; 312 mp->m_flags |= XFS_MOUNT_NOUUID;
313 if (ap->flags & XFSMNT_BARRIER) 313 if (ap->flags & XFSMNT_BARRIER)
314 mp->m_flags |= XFS_MOUNT_BARRIER; 314 mp->m_flags |= XFS_MOUNT_BARRIER;
315 else
316 mp->m_flags &= ~XFS_MOUNT_BARRIER;
315 317
316 return 0; 318 return 0;
317} 319}
@@ -655,6 +657,11 @@ xfs_mntupdate(
655 else 657 else
656 mp->m_flags &= ~XFS_MOUNT_NOATIME; 658 mp->m_flags &= ~XFS_MOUNT_NOATIME;
657 659
660 if (args->flags & XFSMNT_BARRIER)
661 mp->m_flags |= XFS_MOUNT_BARRIER;
662 else
663 mp->m_flags &= ~XFS_MOUNT_BARRIER;
664
658 if ((vfsp->vfs_flag & VFS_RDONLY) && 665 if ((vfsp->vfs_flag & VFS_RDONLY) &&
659 !(*flags & MS_RDONLY)) { 666 !(*flags & MS_RDONLY)) {
660 vfsp->vfs_flag &= ~VFS_RDONLY; 667 vfsp->vfs_flag &= ~VFS_RDONLY;
@@ -1634,6 +1641,7 @@ xfs_vget(
1634#define MNTOPT_NORECOVERY "norecovery" /* don't run XFS recovery */ 1641#define MNTOPT_NORECOVERY "norecovery" /* don't run XFS recovery */
1635#define MNTOPT_BARRIER "barrier" /* use writer barriers for log write and 1642#define MNTOPT_BARRIER "barrier" /* use writer barriers for log write and
1636 * unwritten extent conversion */ 1643 * unwritten extent conversion */
1644#define MNTOPT_NOBARRIER "nobarrier" /* .. disable */
1637#define MNTOPT_OSYNCISOSYNC "osyncisosync" /* o_sync is REALLY o_sync */ 1645#define MNTOPT_OSYNCISOSYNC "osyncisosync" /* o_sync is REALLY o_sync */
1638#define MNTOPT_64BITINODE "inode64" /* inodes can be allocated anywhere */ 1646#define MNTOPT_64BITINODE "inode64" /* inodes can be allocated anywhere */
1639#define MNTOPT_IKEEP "ikeep" /* do not free empty inode clusters */ 1647#define MNTOPT_IKEEP "ikeep" /* do not free empty inode clusters */
@@ -1681,6 +1689,7 @@ xfs_parseargs(
1681 1689
1682 args->flags2 |= XFSMNT2_COMPAT_IOSIZE; 1690 args->flags2 |= XFSMNT2_COMPAT_IOSIZE;
1683 args->flags |= XFSMNT_COMPAT_ATTR; 1691 args->flags |= XFSMNT_COMPAT_ATTR;
1692 args->flags |= XFSMNT_BARRIER;
1684 1693
1685#if 0 /* XXX: off by default, until some remaining issues ironed out */ 1694#if 0 /* XXX: off by default, until some remaining issues ironed out */
1686 args->flags |= XFSMNT_IDELETE; /* default to on */ 1695 args->flags |= XFSMNT_IDELETE; /* default to on */
@@ -1806,6 +1815,8 @@ xfs_parseargs(
1806 args->flags |= XFSMNT_NOUUID; 1815 args->flags |= XFSMNT_NOUUID;
1807 } else if (!strcmp(this_char, MNTOPT_BARRIER)) { 1816 } else if (!strcmp(this_char, MNTOPT_BARRIER)) {
1808 args->flags |= XFSMNT_BARRIER; 1817 args->flags |= XFSMNT_BARRIER;
1818 } else if (!strcmp(this_char, MNTOPT_NOBARRIER)) {
1819 args->flags &= ~XFSMNT_BARRIER;
1809 } else if (!strcmp(this_char, MNTOPT_IKEEP)) { 1820 } else if (!strcmp(this_char, MNTOPT_IKEEP)) {
1810 args->flags &= ~XFSMNT_IDELETE; 1821 args->flags &= ~XFSMNT_IDELETE;
1811 } else if (!strcmp(this_char, MNTOPT_NOIKEEP)) { 1822 } else if (!strcmp(this_char, MNTOPT_NOIKEEP)) {
@@ -1892,7 +1903,6 @@ xfs_showargs(
1892 { XFS_MOUNT_NOUUID, "," MNTOPT_NOUUID }, 1903 { XFS_MOUNT_NOUUID, "," MNTOPT_NOUUID },
1893 { XFS_MOUNT_NORECOVERY, "," MNTOPT_NORECOVERY }, 1904 { XFS_MOUNT_NORECOVERY, "," MNTOPT_NORECOVERY },
1894 { XFS_MOUNT_OSYNCISOSYNC, "," MNTOPT_OSYNCISOSYNC }, 1905 { XFS_MOUNT_OSYNCISOSYNC, "," MNTOPT_OSYNCISOSYNC },
1895 { XFS_MOUNT_BARRIER, "," MNTOPT_BARRIER },
1896 { XFS_MOUNT_IDELETE, "," MNTOPT_NOIKEEP }, 1906 { XFS_MOUNT_IDELETE, "," MNTOPT_NOIKEEP },
1897 { 0, NULL } 1907 { 0, NULL }
1898 }; 1908 };
@@ -1941,6 +1951,9 @@ xfs_showargs(
1941 if (!(vfsp->vfs_flag & VFS_32BITINODES)) 1951 if (!(vfsp->vfs_flag & VFS_32BITINODES))
1942 seq_printf(m, "," MNTOPT_64BITINODE); 1952 seq_printf(m, "," MNTOPT_64BITINODE);
1943 1953
1954 if (!(vfsp->vfs_flag & XFS_MOUNT_BARRIER))
1955 seq_printf(m, "," MNTOPT_NOBARRIER);
1956
1944 if (vfsp->vfs_flag & VFS_GRPID) 1957 if (vfsp->vfs_flag & VFS_GRPID)
1945 seq_printf(m, "," MNTOPT_GRPID); 1958 seq_printf(m, "," MNTOPT_GRPID);
1946 1959