summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_mount.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2003-02-19 01:06:44 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2003-02-19 01:06:44 -0800
commitb76a852bfb51ffe25505bab3dfd87ddbc821c2aa (patch)
tree25e4f88a1d60f92c7f00f19e835a23d1502c5c82 /fs/xfs/xfs_mount.c
parent612cbdcf44289e81a4327d8f67fcc41e07ad33c3 (diff)
parent6ab007bf3fd8db711771db1e93880213a63ecd38 (diff)
Merge bk://are.twiddle.net/axp-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
Diffstat (limited to 'fs/xfs/xfs_mount.c')
-rw-r--r--fs/xfs/xfs_mount.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index df578881cb..6fa2f67a74 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -272,7 +272,7 @@ xfs_mount_validate_sb(
cmn_err(CE_WARN,
"XFS: Only page-sized (%d) or less blocksizes currently work.",
PAGE_SIZE);
- return XFS_ERROR(EWRONGFS);
+ return XFS_ERROR(ENOSYS);
}
return 0;
@@ -459,10 +459,22 @@ xfs_readsb(xfs_mount_t *mp)
}
/*
- * Re-read the superblock so that our buffer is correctly sized.
- * We only need to do this if sector size on-disk is different.
+ * We must be able to do sector-sized and sector-aligned IO.
+ */
+ if (sector_size > mp->m_sb.sb_sectsize) {
+ cmn_err(CE_WARN,
+ "XFS: device supports only %u byte sectors (not %u)",
+ sector_size, mp->m_sb.sb_sectsize);
+ XFS_BUF_UNMANAGE(bp);
+ xfs_buf_relse(bp);
+ return XFS_ERROR(ENOSYS);
+ }
+
+ /*
+ * If device sector size is smaller than the superblock size,
+ * re-read the superblock so the buffer is correctly sized.
*/
- if (sector_size != mp->m_sb.sb_sectsize) {
+ if (sector_size < mp->m_sb.sb_sectsize) {
XFS_BUF_UNMANAGE(bp);
xfs_buf_relse(bp);
sector_size = mp->m_sb.sb_sectsize;