From: Andrew Morton Subject: Re: readahead not being thrown away by invalidate_inode_pages in 2.4 Date: Mon, 23 Feb 2004 11:41:11 -0800 Sender: linux-cifs-client-bounces+glfc-linux-cifs-client=gmane.org@lists.samba.org Message-ID: <20040223114111.68873e00.akpm@osdl.org> References: <1075948711.1255.11.camel@stevef95.austin.ibm.com> <20040222222930.61962157.akpm@osdl.org> <20040223164533.GB1146@schnapps.adilger.int> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, linux-cifs-client@lists.samba.org, smfltc@us.ibm.com Return-path: To: Andreas Dilger In-Reply-To: <20040223164533.GB1146@schnapps.adilger.int> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-cifs-client-bounces+glfc-linux-cifs-client=gmane.org@lists.samba.org List-Id: linux-fsdevel.vger.kernel.org Andreas Dilger wrote: > > > (Delayed response) > > > > invalidate_inode_pages() is just best-effort. If pages are currently under > > I/O then they will not be invalidated. > > > > You will probably have some success with > > > > down(i_sem) > > filemap_fdatasync() > > filemap_fdatawait() > > invalidate_inode_pages() > > up(i_sem) > > What about truncate_inode_pages(inode, 0)? If someone is mmapping those pages they'll end up with anonymous pages where they thought they had pagecache.