* [PATCH] Don't assert if trying to mount with blocksize > pagesize
@ 2008-06-26 2:56 Lachlan McIlroy
2008-06-26 3:03 ` Dave Chinner
2008-06-26 8:20 ` Christoph Hellwig
0 siblings, 2 replies; 3+ messages in thread
From: Lachlan McIlroy @ 2008-06-26 2:56 UTC (permalink / raw)
To: xfs-dev, xfs-oss
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.
--- fs/xfs/xfs_mount.c_1.436 2008-06-26 12:44:06.000000000 +1000
+++ fs/xfs/xfs_mount.c 2008-06-26 12:48:15.000000000 +1000
@@ -258,6 +258,19 @@ xfs_mount_validate_sb(
return XFS_ERROR(EFSCORRUPTED);
}
+ /*
+ * Until this is fixed only page-sized or smaller data blocks work.
+ */
+ if (unlikely(sbp->sb_blocksize > PAGE_SIZE)) {
+ xfs_fs_mount_cmn_err(flags,
+ "file system with blocksize %d bytes",
+ sbp->sb_blocksize);
+ xfs_fs_mount_cmn_err(flags,
+ "only pagesize (%ld) or less will currently work.",
+ PAGE_SIZE);
+ return XFS_ERROR(ENOSYS);
+ }
+
if (xfs_sb_validate_fsb_count(sbp, sbp->sb_dblocks) ||
xfs_sb_validate_fsb_count(sbp, sbp->sb_rblocks)) {
xfs_fs_mount_cmn_err(flags,
@@ -279,19 +292,6 @@ xfs_mount_validate_sb(
return XFS_ERROR(ENOSYS);
}
- /*
- * Until this is fixed only page-sized or smaller data blocks work.
- */
- if (unlikely(sbp->sb_blocksize > PAGE_SIZE)) {
- xfs_fs_mount_cmn_err(flags,
- "file system with blocksize %d bytes",
- sbp->sb_blocksize);
- xfs_fs_mount_cmn_err(flags,
- "only pagesize (%ld) or less will currently work.",
- PAGE_SIZE);
- return XFS_ERROR(ENOSYS);
- }
-
return 0;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Don't assert if trying to mount with blocksize > pagesize
2008-06-26 2:56 [PATCH] Don't assert if trying to mount with blocksize > pagesize Lachlan McIlroy
@ 2008-06-26 3:03 ` Dave Chinner
2008-06-26 8:20 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Dave Chinner @ 2008-06-26 3:03 UTC (permalink / raw)
To: Lachlan McIlroy; +Cc: xfs-dev, xfs-oss
On Thu, Jun 26, 2008 at 12:56:45PM +1000, Lachlan McIlroy wrote:
> 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.
Yes, looks like a problem. The fix looks ok.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Don't assert if trying to mount with blocksize > pagesize
2008-06-26 2:56 [PATCH] Don't assert if trying to mount with blocksize > pagesize Lachlan McIlroy
2008-06-26 3:03 ` Dave Chinner
@ 2008-06-26 8:20 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2008-06-26 8:20 UTC (permalink / raw)
To: Lachlan McIlroy; +Cc: xfs-dev, xfs-oss
On Thu, Jun 26, 2008 at 12:56:45PM +1000, Lachlan McIlroy wrote:
> 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.
The patch looks good, but the subject is rather misleading, it should
rather be something like:
"move check for blocksize > pagesize later in the mount path"
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-06-26 8:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-26 2:56 [PATCH] Don't assert if trying to mount with blocksize > pagesize Lachlan McIlroy
2008-06-26 3:03 ` Dave Chinner
2008-06-26 8:20 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox