aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2006-07-28 17:05:13 +1000
committerNathan Scott <nathans@sgi.com>2006-07-28 17:05:13 +1000
commitb2ea401bac39e75ebb64038609ed22efbc799905 (patch)
tree09b8af2864393f5e5ac0f1d71977d141b64c8fc8 /fs
parentf5faad799475c4058416264f672bb33bf8b5ef41 (diff)
[XFS] Fix a barrier related forced shutdown on mounts with quota enabled.
SGI-PV: 912426 SGI-Modid: xfs-linux-melb:xfs-kern:26622a Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c7
-rw-r--r--fs/xfs/xfs_vfsops.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index 9bdef9d5190..4754f342a5d 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -314,6 +314,13 @@ xfs_mountfs_check_barriers(xfs_mount_t *mp)
return;
}
+ if (xfs_readonly_buftarg(mp->m_ddev_targp)) {
+ xfs_fs_cmn_err(CE_NOTE, mp,
+ "Disabling barriers, underlying device is readonly");
+ mp->m_flags &= ~XFS_MOUNT_BARRIER;
+ return;
+ }
+
error = xfs_barrier_test(mp);
if (error) {
xfs_fs_cmn_err(CE_NOTE, mp,
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index 6c96391f3f1..b427d220a16 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -515,7 +515,7 @@ xfs_mount(
if (error)
goto error2;
- if ((mp->m_flags & XFS_MOUNT_BARRIER) && !(vfsp->vfs_flag & VFS_RDONLY))
+ if (mp->m_flags & XFS_MOUNT_BARRIER)
xfs_mountfs_check_barriers(mp);
error = XFS_IOINIT(vfsp, args, flags);