lkml.org 
[lkml]   [2004]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Ibm Serveraid Problem with 2.4.25
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: <cel at netapp dot com>
personal: <chucklever at bigfoot dot com>

-
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/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.077 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site