Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261370AbUCARYG (ORCPT ); Mon, 1 Mar 2004 12:24:06 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261372AbUCARYG (ORCPT ); Mon, 1 Mar 2004 12:24:06 -0500 Received: from citi.umich.edu ([141.211.133.111]:44725 "EHLO citi.umich.edu") by vger.kernel.org with ESMTP id S261370AbUCARYC (ORCPT ); Mon, 1 Mar 2004 12:24:02 -0500 Date: Mon, 1 Mar 2004 12:24:01 -0500 (EST) From: Chuck Lever To: Marcelo Tosatti Cc: Alain Fauconnet , Jo Christian Buvarp , Enrico Demarin , Subject: Re: Ibm Serveraid Problem with 2.4.25 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1953 Lines: 59 hi marcelo- your "fix" will break readahead again for NFS. with the ">=" as you propose, the read ahead code will never be able to read the last page of the file as a coalesced read, it will always be a separate 4KB read. the problem is not the readahead code, it is the driver code that tries to read beyond the end of the device. my change merely exposed this misbehavior. so there is a broken assumption somewhere about how the index of the last page of a file/device is computed. i think it is a problem when the file ends exactly on a page boundary. alain, if you don't use the NFS client, marcelo's fix should work just fine for you. but i believe that in general it is incorrect. On Mon, 1 Mar 2004, Marcelo Tosatti wrote: > > On Mon, 1 Mar 2004, Alain Fauconnet wrote: > > > Please followup to the list when you've drawn conclusions about this > > issue. > > I'm holding a 2.4.25 upgrade of a busy mail server because of this. > > We found out the guilty part, its the readahead modifications done by > Chuck Lever in -pre1. > > The error is harmless though, you can safely move your server to 2.4.25. > Its just trying to readahead a page beyond the end device. > > The following untested patch on top of 2.4.25 should fix it: > > --- mm/filemap.c.orig 2004-03-01 12:47:41.000000000 -0300 > +++ mm/filemap.c 2004-03-01 12:48:30.000000000 -0300 > @@ -1346,7 +1346,7 @@ > while (ahead < max_ahead) { > unsigned long ra_index = raend + ahead + 1; > > - if (ra_index > end_index) > + if (ra_index >= end_index) > break; > if (page_cache_read(filp, ra_index) < 0) > break; > > - Chuck Lever -- corporate: personal: - 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/