Commit b2ea401b authored by Nathan Scott's avatar Nathan Scott

[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: default avatarNathan Scott <nathans@sgi.com>
parent f5faad79
...@@ -314,6 +314,13 @@ xfs_mountfs_check_barriers(xfs_mount_t *mp) ...@@ -314,6 +314,13 @@ xfs_mountfs_check_barriers(xfs_mount_t *mp)
return; 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); error = xfs_barrier_test(mp);
if (error) { if (error) {
xfs_fs_cmn_err(CE_NOTE, mp, xfs_fs_cmn_err(CE_NOTE, mp,
......
...@@ -515,7 +515,7 @@ xfs_mount( ...@@ -515,7 +515,7 @@ xfs_mount(
if (error) if (error)
goto error2; 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); xfs_mountfs_check_barriers(mp);
error = XFS_IOINIT(vfsp, args, flags); error = XFS_IOINIT(vfsp, args, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment