Re: Reading page from given block device

Andrew Morton (akpm@zip.com.au)
Wed, 08 May 2002 17:07:24 -0700


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/