Re: mapping from file's block to memory page ?

From: Steve Dodd (steved@loth.demon.co.uk)
Date: Sat May 27 2000 - 16:17:12 EST


On Mon, May 22, 2000 at 02:55:24PM +0300, BenHanokh Gabriel wrote:

> how do i map from filesystem blocks into memory pages in the new kernel
> ?
> is there a mechanism like the bh = bread( dev, block, size ) in kernel
> 2.2 ?

bread() will still work but if you're reading file data you should use the
page cache to keep things consistent. You probably want
mm/filemap.c:read_cache_page, for an example of its use look at
fs/namei.c:page_getlink.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed May 31 2000 - 21:00:21 EST