Re: Reading page from given block device

From: Andrew Morton (akpm@zip.com.au)
Date: Wed May 08 2002 - 19:07:24 EST


Pavel Machek wrote:
>
> ...
> Second try:
>
> c0134a28 -- __getblk
> __get_hash_table

hmm. It looks like your blockdev may have the wrong
blocksize in bd_inode->i_blkbits, and __get_hash_table
cannot find the 4k block against the 1k blocksize device.
It keeps returning zero.

The new pagecache-based __get_hash_table uses bd_inode->i_blkbits
to go from a block number to a pagecache index. That works
fine when called via the official `bread()' function, but
probably your __bread() approach has confused it.

Try running set_blocksize(bdev, PAGE_SIZE) before calling
__bread().

-
-
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/



This archive was generated by hypermail 2b29 : Tue May 14 2002 - 12:00:10 EST