Re: fs block size and PAGE_CACHE_SIZE

Trond Myklebust
2003-05-12T00:19:06Z

>>>>> " " == David Chow <davidchow@shaolinmicro.com> writes:

> How can you make sure there are no race conditions in
> populating multiple page caches and making them up-to-date
> afterwards? Since readpage only make sures you lock one page,

Have a browse through mm/readahead.c (in particular read_pages() and
read_cache_pages()).
The page is is anonymous when it gets locked, and is only added to the
page cache) if there is no existing page. The lock is only released by
the filler.

> If readpages() is added for 2.5, it doesn't mean read page
> don't have to implement readpage(), right?

Right. You still have to implement readpage.

Cheers,
Trond