From: Dave Chinner <dchinner@xxxxxxxxxx> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> --- fs/xfs/libxfs/xfs_sb.c | 2 ++ fs/xfs/xfs_mount.c | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c index b5a82acd7dfe..e0881545a929 100644 --- a/fs/xfs/libxfs/xfs_sb.c +++ b/fs/xfs/libxfs/xfs_sb.c @@ -354,6 +354,7 @@ xfs_validate_sb_common( return -EFSCORRUPTED; } +#if 0 /* * Until this is fixed only page-sized or smaller data blocks work. */ @@ -364,6 +365,7 @@ xfs_validate_sb_common( sbp->sb_blocksize, PAGE_SIZE); return -ENOSYS; } +#endif /* * Currently only very few inode sizes are supported. diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 02d15098dbee..e0d95d56f776 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c @@ -164,7 +164,16 @@ xfs_sb_validate_fsb_count( xfs_sb_t *sbp, uint64_t nblocks) { - ASSERT(PAGE_SHIFT >= sbp->sb_blocklog); + int shift = PAGE_SHIFT - sbp->sb_blocklog; + + /* + * block size larger than page size still limited to page cache + * page size limits. + */ + if (shift < 0) + shift = 0; + + //ASSERT(PAGE_SHIFT >= sbp->sb_blocklog); ASSERT(sbp->sb_blocklog >= BBSHIFT); /* Limited by ULONG_MAX of page cache index */ -- 2.19.1