cramfs and page size

Jonas Holmberg (
Tue, 11 Sep 2001 13:39:05 +0200

I'm having trouble with cramfs in a 2.4.9 kernel with PAGE_CACHE_SIZE == 8192.
cramfs tries to read beyond the size of my block device.

I think I've found the problem: in the function cramfs_read in fs/cramfs/inode.c
the line

devsize = blk_size[major][minor] >> 2;

seems to assume a block size of 4096 bytes. Shouldn't it be depending on
PAGE_CACHE_SIZE or the block size of the filesystem? The following works
for me:

devsize = blk_size[major][minor] / (PAGE_CACHE_SIZE / 1024);

Best regards
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at