diff options
author | Lachlan McIlroy <lachlan@sgi.com> | 2008-06-26 23:34:34 -0400 |
---|---|---|
committer | Niv Sardi <xaiki@debian.org> | 2008-07-28 02:59:15 -0400 |
commit | 2edbddd5f46cc123b68c11179115041c54759fa2 (patch) | |
tree | 845f418fd623875c5a39f0faf823114364e53de8 | |
parent | 8f8670bb1cfa177d35c54e4cc96152dc425a7ab3 (diff) |
[XFS] Don't assert if trying to mount with blocksize > pagesize
If we don't do the blocksize/PAGESIZE check before calling
xfs_sb_validate_fsb_count() we can assert if we try to mount with a
blocksize > pagesize. The assert is valid so leave it and just move the
blocksize/pagesize check earlier.
SGI-PV: 983734
SGI-Modid: xfs-linux-melb:xfs-kern:31365a
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: David Chinner <dgc@sgi.com>
-rw-r--r-- | fs/xfs/xfs_mount.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 1bfaa204f689..6c5d1325e7f6 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c | |||
@@ -258,6 +258,19 @@ xfs_mount_validate_sb( | |||
258 | return XFS_ERROR(EFSCORRUPTED); | 258 | return XFS_ERROR(EFSCORRUPTED); |
259 | } | 259 | } |
260 | 260 | ||
261 | /* | ||
262 | * Until this is fixed only page-sized or smaller data blocks work. | ||
263 | */ | ||
264 | if (unlikely(sbp->sb_blocksize > PAGE_SIZE)) { | ||
265 | xfs_fs_mount_cmn_err(flags, | ||
266 | "file system with blocksize %d bytes", | ||
267 | sbp->sb_blocksize); | ||
268 | xfs_fs_mount_cmn_err(flags, | ||
269 | "only pagesize (%ld) or less will currently work.", | ||
270 | PAGE_SIZE); | ||
271 | return XFS_ERROR(ENOSYS); | ||
272 | } | ||
273 | |||
261 | if (xfs_sb_validate_fsb_count(sbp, sbp->sb_dblocks) || | 274 | if (xfs_sb_validate_fsb_count(sbp, sbp->sb_dblocks) || |
262 | xfs_sb_validate_fsb_count(sbp, sbp->sb_rblocks)) { | 275 | xfs_sb_validate_fsb_count(sbp, sbp->sb_rblocks)) { |
263 | xfs_fs_mount_cmn_err(flags, | 276 | xfs_fs_mount_cmn_err(flags, |
@@ -279,19 +292,6 @@ xfs_mount_validate_sb( | |||
279 | return XFS_ERROR(ENOSYS); | 292 | return XFS_ERROR(ENOSYS); |
280 | } | 293 | } |
281 | 294 | ||
282 | /* | ||
283 | * Until this is fixed only page-sized or smaller data blocks work. | ||
284 | */ | ||
285 | if (unlikely(sbp->sb_blocksize > PAGE_SIZE)) { | ||
286 | xfs_fs_mount_cmn_err(flags, | ||
287 | "file system with blocksize %d bytes", | ||
288 | sbp->sb_blocksize); | ||
289 | xfs_fs_mount_cmn_err(flags, | ||
290 | "only pagesize (%ld) or less will currently work.", | ||
291 | PAGE_SIZE); | ||
292 | return XFS_ERROR(ENOSYS); | ||
293 | } | ||
294 | |||
295 | return 0; | 295 | return 0; |
296 | } | 296 | } |
297 | 297 | ||