lkml.org 
[lkml]   [2001]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectcramfs and page size
Date
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
/Jonas
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:03    [W:0.026 / U:3.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site