From: Trond Myklebust Subject: Re: fs block size and PAGE_CACHE_SIZE Date: Mon, 12 May 2003 02:31:37 +0200 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <16062.60265.978839.698174@charged.uio.no> References: <3EB7F401.1010908@shaolinmicro.com> <3EBE85E8.50906@shaolinmicro.com> Reply-To: trond.myklebust@fys.uio.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from pat.uio.no ([129.240.130.16]:16275 "EHLO pat.uio.no") by vger.kernel.org with ESMTP id S261562AbTELATG (ORCPT ); Sun, 11 May 2003 20:19:06 -0400 To: David Chow In-Reply-To: <3EBE85E8.50906@shaolinmicro.com> List-Id: linux-fsdevel.vger.kernel.org >>>>> " " == David Chow 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